From 51ea59d76a3e0ee72a9a3bb59bd61845dea64e5e Mon Sep 17 00:00:00 2001 From: Ginger Bill Date: Thu, 4 May 2017 23:18:54 +0100 Subject: Fix calculation of vector type sizes --- src/check_expr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/check_expr.c') 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) { -- cgit v1.2.3