diff options
author | flywind <43030857+xflywind@users.noreply.github.com> | 2020-10-31 10:03:51 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-31 03:03:51 +0100 |
commit | bc9a52127092680c662e0456797cbd1278203360 (patch) | |
tree | 9fe1436561927c70da2f769b628bb04182210569 | |
parent | 28bbcd9d45f15247af347785a46d0c2e2750b8ca (diff) | |
download | Nim-bc9a52127092680c662e0456797cbd1278203360.tar.gz |
[closes #12682]add testcase for #12682 (#15796)
* add testcase for #12682 * fix
-rw-r--r-- | tests/misc/tlocals.nim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/misc/tlocals.nim b/tests/misc/tlocals.nim index ad9e7d032..a6df68224 100644 --- a/tests/misc/tlocals.nim +++ b/tests/misc/tlocals.nim @@ -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() |