mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-11 22:08:54 +00:00
15
tests/misc/t3482.nim
Normal file
15
tests/misc/t3482.nim
Normal file
@@ -0,0 +1,15 @@
|
||||
discard """
|
||||
action: reject
|
||||
nimout: "t3482.nim(13, 8) Error: undeclared identifier: 'output'"
|
||||
"""
|
||||
# bug #3482 (correct behavior since 1.4.0, cgen error in 1.2.0)
|
||||
template foo*(body: typed) =
|
||||
if true:
|
||||
body
|
||||
|
||||
proc test =
|
||||
foo:
|
||||
var output = ""
|
||||
echo output.len
|
||||
|
||||
test()
|
||||
Reference in New Issue
Block a user