mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-09 06:12:05 -04:00
Fix #7316: a polymorphic procedure in a constant compound literal is its instance, not nil
This commit is contained in:
1 parent
14950b8ae9
commit
6bc4b69ab8
4 files changed
+50
-1
No files matched your search
+1
-1
@@ -1006,7 +1006,7 @@ gb_internal i64 check_distance_between_types(CheckerContext *c, Operand *operand
|
||||
PolyProcData poly_proc_data = {};
|
||||
if (check_polymorphic_procedure_assignment(c, operand, type, operand->expr, &poly_proc_data)) {
|
||||
Entity *e = poly_proc_data.gen_entity;
|
||||
add_type_and_value(c, operand->expr, Addressing_Value, e->type, {});
|
||||
add_type_and_value(c, operand->expr, Addressing_Value, e->type, exact_value_procedure(operand->expr));
|
||||
Ast *expr = unparen_expr(operand->expr);
|
||||
if (expr->kind == Ast_SelectorExpr) {
|
||||
add_entity_use(c, expr->SelectorExpr.selector, e);
|
||||
|
||||
Reference in new issue
Block a user