Fix union array bug (Issue #112)

This commit is contained in:
Ginger Bill
2017-09-29 21:35:59 +01:00
parent e6e9375b09
commit 8c7cf0dbb0
4 changed files with 32 additions and 24 deletions

View File

@@ -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;
}