diff options
| author | gingerBill <bill@gingerbill.org> | 2017-12-03 22:28:54 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2017-12-03 22:28:54 +0000 |
| commit | 9f52b2c2834a3a7248784492a3ede3a8a9063f6a (patch) | |
| tree | 24a356de9aa52103c0a363c6ca50db142dc36227 /src/check_expr.cpp | |
| parent | 8035a407a6838b1bc3fa1b4c09281c5918cb6bc2 (diff) | |
Update demo.odin
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index cf1005055..eaa54306c 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -56,7 +56,7 @@ void check_expr_or_type (Checker *c, Operand *operand, AstNode * ExprKind check_expr_base (Checker *c, Operand *operand, AstNode *expression, Type *type_hint); void check_expr_with_type_hint (Checker *c, Operand *o, AstNode *e, Type *t); Type * check_type (Checker *c, AstNode *expression, Type *named_type = nullptr); -Type * make_optional_ok_type(gbAllocator a, Type *value); +Type * make_optional_ok_type (gbAllocator a, Type *value); void check_type_decl (Checker *c, Entity *e, AstNode *type_expr, Type *def, bool alias); Entity * check_selector (Checker *c, Operand *operand, AstNode *node, Type *type_hint); Entity * check_ident (Checker *c, Operand *o, AstNode *n, Type *named_type, Type *type_hint, bool allow_import_name); @@ -2862,7 +2862,7 @@ bool check_builtin_procedure(Checker *c, Operand *operand, AstNode *call, i32 id mode = Addressing_Constant; value = exact_value_i64(at->Array.count); type = t_untyped_integer; - } else if (is_type_slice(op_type)) { + } else if (is_type_slice(op_type) && id == BuiltinProc_len) { mode = Addressing_Value; } else if (is_type_dynamic_array(op_type)) { mode = Addressing_Value; |