commit 5bdcdd1669de05ea4b09e8319186f2792626f003 (tree)
parent 207862647c00ef824a6dd43be0bfc69d844fc075
Author: Andrew Kelley <superjoe30@gmail.com>
Date: Tue, 9 Feb 2016 10:02:31 -0700
@const_eval returns poison value for type when it fails
resulting in fewer redundant error messages
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/analyze.cpp b/src/analyze.cpp
@@ -4155,7 +4155,7 @@ static TypeTableEntry *analyze_builtin_fn_call_expr(CodeGen *g, ImportTableEntry
if (!const_expr_val->ok) {
add_node_error(g, *expr_node, buf_sprintf("unable to evaluate constant expression"));
- return resolved_type;
+ return g->builtin_types.entry_invalid;
}
ConstExprValue *const_val = &get_resolved_expr(node)->const_val;