Closed metagn closed 1 week ago
Thanks for your hard work on this PR! The lines below are statistics of the Nim compiler built from 511ab72342be5b194919c9af0aa7754e42aba156
Hint: mm: orc; opt: speed; options: -d:release 177442 lines; 8.840s; 652.32MiB peakmem
split from #24425
Matching
tyGenericBody
performs a match on the last child of the generic body, in this case the uninstantiedtyObject
type. If the object contains no generic fields, this ends up being the same type as all instantiated ones, but if it does, a new type is created. This fails thesameObjectTypes
check that subtype matching for object types uses. To fix this, also consider that the pattern type could be the generic uninstantiated object type of the matched type in subtype matching.