@const_eval returns poison value for type when it fails
resulting in fewer redundant error messages
This commit is contained in:
parent
207862647c
commit
5bdcdd1669
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user