mirror of
https://github.com/nim-lang/Nim.git
synced 2026-08-28 01:21:40 +00:00
fixes #23765; Method calling proc with return value overlapping declared generic type generates invalid C
This commit is contained in:
@@ -81,7 +81,8 @@ proc sameInstantiation(a, b: TInstantiation): bool =
|
||||
if not compareTypes(a.concreteTypes[i], b.concreteTypes[i],
|
||||
flags = {ExactTypeDescValues,
|
||||
ExactGcSafety,
|
||||
PickyCAliases}): return
|
||||
PickyCAliases,
|
||||
PickyBackendAliases}): return
|
||||
result = true
|
||||
else:
|
||||
result = false
|
||||
|
||||
@@ -52,7 +52,8 @@ proc searchInstTypes*(g: ModuleGraph; key: PType): PType =
|
||||
for j in FirstGenericParamAt..<key.kidsLen:
|
||||
# XXX sameType is not really correct for nested generics?
|
||||
if not compareTypes(inst[j], key[j],
|
||||
flags = {ExactGenericParams, PickyCAliases}):
|
||||
flags = {ExactGenericParams, PickyCAliases,
|
||||
PickyBackendAliases}):
|
||||
break matchType
|
||||
|
||||
return inst
|
||||
|
||||
Reference in New Issue
Block a user