diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-09-29 21:35:59 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-09-29 21:35:59 +0100 |
| commit | 8c7cf0dbb0b4cf9730788c619c8cb9adf8f284a1 (patch) | |
| tree | 4c1c42933a94a52a7eb7bed7868ffe0a985558bf /src/check_expr.cpp | |
| parent | e6e9375b091ad7ecf83be53a081e08ee87482118 (diff) | |
Fix union array bug (Issue #112)
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index d28419ccf..3d4dd9147 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -7677,7 +7677,8 @@ ExprKind check_expr_base_internal(Checker *c, Operand *o, AstNode *node, Type *t isize index = 0; isize elem_count = cl->elems.count; - if (is_type_any(base_type(elem_type))) { + Type *bet = base_type(elem_type); + if (!elem_type_can_be_constant(bet)) { is_constant = false; } |