From 1e587d6635e93ca36ad2e6c8615dffed2b92e1fb Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sat, 27 Mar 2021 15:22:05 +0000 Subject: Fix #883 - polymorphic specialization with target types of enumerated arrays --- src/check_type.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/check_type.cpp') diff --git a/src/check_type.cpp b/src/check_type.cpp index 3eada163c..881bb9600 100644 --- a/src/check_type.cpp +++ b/src/check_type.cpp @@ -1187,7 +1187,11 @@ bool check_type_specialization_to(CheckerContext *ctx, Type *specialization, Typ Type *t = base_type(type); Type *s = base_type(specialization); if (t->kind != s->kind) { - return false; + if (t->kind == Type_EnumeratedArray && s->kind == Type_Array) { + // Might be okay, check later + } else { + return false; + } } if (is_type_untyped(t)) { -- cgit v1.2.3