aboutsummaryrefslogtreecommitdiff
path: root/src/eval.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/eval.cpp')
-rw-r--r--src/eval.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/eval.cpp b/src/eval.cpp
index b235040b87..1196e52d5c 100644
--- a/src/eval.cpp
+++ b/src/eval.cpp
@@ -545,7 +545,7 @@ void eval_const_expr_implicit_cast(CastOp cast_op,
ConstExprValue *const_val, TypeTableEntry *new_type)
{
const_val->depends_on_compile_var = other_val->depends_on_compile_var;
- const_val->undef = other_val->undef;
+ const_val->special = other_val->special;
assert(other_val != const_val);
switch (cast_op) {
@@ -572,7 +572,7 @@ void eval_const_expr_implicit_cast(CastOp cast_op,
const_val->data.x_ptr.ptr = ptr_val;
const_val->data.x_ptr.len = 1;
const_val->ok = true;
- const_val->undef = other_val->undef;
+ const_val->special = other_val->special;
const_val->depends_on_compile_var = other_val->depends_on_compile_var;
} else {
zig_panic("TODO");
@@ -608,7 +608,7 @@ void eval_const_expr_implicit_cast(CastOp cast_op,
const_val->data.x_maybe = ptr_parent;
const_val->ok = true;
- const_val->undef = other_val->undef;
+ const_val->special = other_val->special;
const_val->depends_on_compile_var = other_val->depends_on_compile_var;
} else {
zig_panic("TODO");
@@ -1277,6 +1277,7 @@ static bool eval_expr(EvalFn *ef, AstNode *node, ConstExprValue *out) {
case NodeTypeSliceExpr:
case NodeTypeNullLiteral:
case NodeTypeUndefinedLiteral:
+ case NodeTypeZeroesLiteral:
case NodeTypeIfVarExpr:
case NodeTypeSwitchExpr:
case NodeTypeSwitchProng: