[closes #12682]add testcase for #12682 (#15796)

* add testcase for #12682

* fix
This commit is contained in:
flywind 2020-10-31 10:03:51 +08:00 • committed by GitHub
commit bc9a521270
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,3 +62,14 @@ proc foo3[T](y: T) =
bar2(y)
foo3(12)
block: # bug #12682
template foo(): untyped =
var c1 = locals()
1
proc testAll()=
doAssert foo() == 1
let c2=locals()
testAll()