fixes #23233; Regression when using generic type with Table/OrderedTable (#23235)

fixes #23233
This commit is contained in:
ringabout
2024-01-20 03:37:16 +08:00
committed by GitHub
parent 1855f67503
commit 720021908d
2 changed files with 22 additions and 2 deletions

View File

@@ -1234,7 +1234,7 @@ proc sameTypeAux(x, y: PType, c: var TSameTypeClosure): bool =
let
lhs = x.skipGenericAlias
rhs = y.skipGenericAlias
if rhs.kind != tyGenericInst or lhs.base != rhs.base:
if rhs.kind != tyGenericInst or lhs.base != rhs.base or rhs.kidsLen != lhs.kidsLen:
return false
for ff, aa in underspecifiedPairs(rhs, lhs, 1, -1):
if not sameTypeAux(ff, aa, c): return false