diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-02-09 10:02:31 -0700 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-02-09 10:02:31 -0700 |
| commit | 5bdcdd1669de05ea4b09e8319186f2792626f003 (patch) | |
| tree | 8c9f844c1223dc61fea3fa42eb5dff9ac29ea840 /src/analyze.cpp | |
| parent | 207862647c00ef824a6dd43be0bfc69d844fc075 (diff) | |
| download | zig-5bdcdd1669de05ea4b09e8319186f2792626f003.tar.gz zig-5bdcdd1669de05ea4b09e8319186f2792626f003.zip | |
@const_eval returns poison value for type when it fails
resulting in fewer redundant error messages
Diffstat (limited to 'src/analyze.cpp')
| -rw-r--r-- | src/analyze.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp index 80f6034a9c..700a3e7a85 100644 --- 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; |
