-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
Description
Description
This might be mentioned elsewhere in another form, but this is a self contained example
this does not work:
template inner(i: int) {.dirty.} =
let thing = 1
template outer() =
proc p[T](x: T) =
inner(5)
echo thing
outer()
p(0)
but this does:
template inner(i: int) {.dirty.} =
let thing = 1
template outer() =
proc p(x: int) =
inner(5)
echo thing
outer()
p(0)
Nim Version
Nim Compiler Version 2.1.9 [Linux: amd64]
Compiled at 2024-07-24
Copyright (c) 2006-2024 by Andreas Rumpf
git hash: c1f91c2
active boot switches: -d:releas
Current Output
Error: undeclared identifier: 'thing'
Expected Output
1
Possible Solution
No response
Additional Information
No response