From 6acc354957752e2cfa8d67bdd0e4c3b42f9be3c3 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 20 Apr 2016 11:58:01 -0700 Subject: for loop: add ability to get pointer to elem var see #51 --- src/eval.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/eval.cpp') diff --git a/src/eval.cpp b/src/eval.cpp index 1fa8f4995e..190f271546 100644 --- a/src/eval.cpp +++ b/src/eval.cpp @@ -812,6 +812,10 @@ static bool eval_for_expr(EvalFn *ef, AstNode *node, ConstExprValue *out_val) { assert(elem_node->type == NodeTypeSymbol); Buf *elem_var_name = &elem_node->data.symbol_expr.symbol; + if (node->data.for_expr.elem_is_ptr) { + zig_panic("TODO"); + } + Buf *index_var_name = nullptr; if (index_node) { assert(index_node->type == NodeTypeSymbol); -- cgit v1.2.3