fix: generic tuples instantiations were cached incorrectly
This commit is contained in:
parent
f18ff6a033
commit
471672fecc
2 changed files with 6 additions and 0 deletions
|
|
@ -803,6 +803,8 @@ proc sameTuple(a, b: PType, c: var TSameTypeClosure): bool =
|
|||
result = x.name.id == y.name.id
|
||||
if not result: break
|
||||
else: internalError(a.n.info, "sameTuple")
|
||||
elif a.n != b.n and (a.n == nil or b.n == nil) and IgnoreTupleFields notin c.flags:
|
||||
result = false
|
||||
|
||||
template ifFastObjectTypeCheckFailed(a, b: PType, body: stmt) {.immediate.} =
|
||||
if tfFromGeneric notin a.flags + b.flags:
|
||||
|
|
|
|||
4
tests/tuples/twrong_generic_caching.nim
Normal file
4
tests/tuples/twrong_generic_caching.nim
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
|
||||
import parsecfg
|
||||
|
||||
import asynchttpserver
|
||||
Loading…
Add table
Add a link
Reference in a new issue