diff options
Diffstat (limited to 'tests/parser/tprocexprasstmt.nim')
-rw-r--r-- | tests/parser/tprocexprasstmt.nim | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/parser/tprocexprasstmt.nim b/tests/parser/tprocexprasstmt.nim new file mode 100644 index 000000000..22fb4a7c8 --- /dev/null +++ b/tests/parser/tprocexprasstmt.nim @@ -0,0 +1,14 @@ +func r(): auto = + func(): int = 2 +doAssert r()() == 2 + +block: # issue #11726 + let foo = block: + var x: int + proc = inc x # "identifier expected, but got '='" + + template paint(): untyped = + proc (s: string): string = s + + let s = paint() + doAssert s("abc") == "abc" |