fixes #5419
This commit is contained in:
parent
92c2a51bf7
commit
22789a0bfc
4 changed files with 35 additions and 1 deletions
|
|
@ -174,7 +174,11 @@ proc semGenericStmt(c: PContext, n: PNode,
|
|||
# XXX for example: ``result.add`` -- ``add`` needs to be looked up here...
|
||||
var dummy: bool
|
||||
result = fuzzyLookup(c, n, flags, ctx, dummy)
|
||||
of nkEmpty, nkSym..nkNilLit:
|
||||
of nkSym:
|
||||
let a = n.sym
|
||||
let b = getGenSym(c, a)
|
||||
if b != a: n.sym = b
|
||||
of nkEmpty, succ(nkSym)..nkNilLit:
|
||||
# see tests/compile/tgensymgeneric.nim:
|
||||
# We need to open the gensym'ed symbol again so that the instantiation
|
||||
# creates a fresh copy; but this is wrong the very first reason for gensym
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue