Fix minimal dependency generation for polymorphic structs (related to issue #121)

This commit is contained in:
gingerBill
2017-10-15 11:21:48 +01:00
parent 94762b56f6
commit e05fe1837d
4 changed files with 454 additions and 438 deletions

View File

@@ -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;