diff options
| author | gingerBill <bill@gingerbill.org> | 2017-10-15 11:21:48 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2017-10-15 11:21:48 +0100 |
| commit | e05fe1837de55741a009f7e35ee4ba6a0e13a1e6 (patch) | |
| tree | 81b689065be9ad7c8e2ae56228f95fbf556549f4 /src/check_expr.cpp | |
| parent | 94762b56f6b07156097846c2c927f120288f065d (diff) | |
Fix minimal dependency generation for polymorphic structs (related to issue #121)
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index c4f953ff7..cdce6297a 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -4867,8 +4867,10 @@ ExprKind check_call_expr(Checker *c, Operand *operand, AstNode *call) { AstNode *s = ident->SelectorExpr.selector; ident = s; } - add_entity_use(c, ident, entity_of_ident(&c->info, ident)); - add_type_and_value(&c->info, call, Addressing_Type, operand->type, empty_exact_value); + Type *ot = operand->type; GB_ASSERT(ot->kind == Type_Named); + Entity *e = ot->Named.type_name; + add_entity_use(c, ident, e); + add_type_and_value(&c->info, call, Addressing_Type, ot, empty_exact_value); } else { operand->mode = Addressing_Invalid; operand->type = t_invalid; |