fixes #2004
This commit is contained in:
parent
ada0f14711
commit
34b4e9fc96
4 changed files with 49 additions and 23 deletions
|
|
@ -12,3 +12,22 @@ template genNodeKind(kind, name: expr): stmt =
|
|||
result.add(c)
|
||||
|
||||
genNodeKind(nnkNone, None)
|
||||
|
||||
|
||||
# Test that generics in templates still work (regression to fix #1915)
|
||||
|
||||
# bug #2004
|
||||
|
||||
type Something = object
|
||||
|
||||
proc testA(x: Something) = discard
|
||||
|
||||
template def(name: expr) {.immediate.} =
|
||||
proc testB[T](reallyUniqueName: T) =
|
||||
`test name`(reallyUniqueName)
|
||||
def A
|
||||
|
||||
var x: Something
|
||||
testB(x)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue