From c6d02e4778486c350a732105b6413ba1d32a234a Mon Sep 17 00:00:00 2001 From: Ginger Bill Date: Thu, 8 Sep 2016 00:23:14 +0100 Subject: Fix missing `type_info` with manual linear search --- src/checker/expr.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/checker/expr.cpp') diff --git a/src/checker/expr.cpp b/src/checker/expr.cpp index 5e97727fd..7bf131f05 100644 --- a/src/checker/expr.cpp +++ b/src/checker/expr.cpp @@ -91,8 +91,6 @@ b32 check_is_assignable_to(Checker *c, Operand *operand, Type *type, b32 is_argu Type *s = operand->type; - - if (are_types_identical(s, type)) { return true; } @@ -179,6 +177,7 @@ void check_assignment(Checker *c, Operand *operand, Type *type, String context_n Type *target_type = type; if (type == NULL || is_type_any(type)) { + add_type_info_type(c, type); target_type = default_type(operand->type); } convert_to_typed(c, operand, target_type); @@ -795,11 +794,6 @@ void check_identifier(Checker *c, Operand *o, AstNode *n, Type *named_type, Cycl o->mode = Addressing_Builtin; break; - case Entity_UsingVariable: - // TODO(bill): Entity_UsingVariable: is this correct? - o->mode = Addressing_Variable; - break; - default: GB_PANIC("Compiler error: Unknown EntityKind"); break; -- cgit v1.2.3