diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-05-04 23:18:54 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-05-04 23:18:54 +0100 |
| commit | 51ea59d76a3e0ee72a9a3bb59bd61845dea64e5e (patch) | |
| tree | 2cd3a1f7db2fa4992f291940efdb39926a9c26bd /src/check_expr.c | |
| parent | 789b297f324206a18128f61679bfd36b9c6265b2 (diff) | |
Fix calculation of vector type sizes
Diffstat (limited to 'src/check_expr.c')
| -rw-r--r-- | src/check_expr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/check_expr.c b/src/check_expr.c index a2267f96c..56899bff4 100644 --- a/src/check_expr.c +++ b/src/check_expr.c @@ -5380,7 +5380,7 @@ ExprKind check_expr_base_internal(Checker *c, Operand *o, AstNode *node, Type *t fields_visited[sel.index.e[0]] = true; check_expr(c, o, fv->value); - if (base_type(field->type) == t_any) { + if (is_type_any(field->type) || is_type_union(field->type) || is_type_raw_union(field->type)) { is_constant = false; } if (is_constant) { @@ -5418,7 +5418,7 @@ ExprKind check_expr_base_internal(Checker *c, Operand *o, AstNode *node, Type *t continue; } - if (base_type(field->type) == t_any) { + if (is_type_any(field->type) || is_type_union(field->type) || is_type_raw_union(field->type)) { is_constant = false; } if (is_constant) { |