summary refs log tree commit diff stats
path: root/tests/parser/tprocexprasstmt.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/parser/tprocexprasstmt.nim')
-rw-r--r--tests/parser/tprocexprasstmt.nim13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/parser/tprocexprasstmt.nim b/tests/parser/tprocexprasstmt.nim
index a02dde6f6..22fb4a7c8 100644
--- a/tests/parser/tprocexprasstmt.nim
+++ b/tests/parser/tprocexprasstmt.nim
@@ -1,3 +1,14 @@
 func r(): auto =
   func(): int = 2
-discard r()()
+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"