From 2ed949a6ae053262ee563b198a8758ba82f50e84 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 8 Aug 2016 20:43:38 -0700 Subject: add zeroes value --- src/eval.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/eval.cpp') 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: -- cgit v1.2.3