mirror of
https://github.com/odin-lang/Odin.git
synced 2026-08-14 09:44:26 +00:00
fix: return true for already specialised poly proc
This commit is contained in:
@@ -410,6 +410,15 @@ gb_internal bool find_or_generate_polymorphic_procedure(CheckerContext *old_c, E
|
||||
}
|
||||
|
||||
if (!src->Proc.is_polymorphic || src->Proc.is_poly_specialized) {
|
||||
// NOTE: polymorphic procedure check not idempotent without this
|
||||
if (src->Proc.is_poly_specialized && base_entity->Procedure.generated_from_polymorphic) {
|
||||
if (are_types_identical(src, dst)) {
|
||||
if (poly_proc_data) {
|
||||
poly_proc_data->gen_entity = base_entity;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user