summary refs log tree commit diff stats
path: root/tests/parser/tprocexprasstmt.nim
diff options
context:
space:
mode:
authormetagn <metagngn@gmail.com>2023-09-19 10:26:26 +0300
committerGitHub <noreply@github.com>2023-09-19 15:26:26 +0800
commit81756d1810c7c00e0bb706bb79f5437120ae4c0e (patch)
tree566145add937c45928787dcb79fdf0515617ba74 /tests/parser/tprocexprasstmt.nim
parent51cb493b221e704efce126049f9f320eb1cb1a36 (diff)
downloadNim-81756d1810c7c00e0bb706bb79f5437120ae4c0e.tar.gz
second test case haul for templates and generics (#22728)
closes #8390, closes #11726, closes #8446, closes #21221, closes #7461,
closes #7995
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"