summary refs log tree commit diff stats
path: root/tests/parser
diff options
context:
space:
mode:
authorhlaaftana <10591326+hlaaftana@users.noreply.github.com>2021-11-24 09:08:07 +0300
committerGitHub <noreply@github.com>2021-11-24 07:08:07 +0100
commit2859069dbe1c943494cb6be299b200afa748cf52 (patch)
treea662da11429450dfd34e84c655f0c2e09999c7e6 /tests/parser
parent5933aece9b5f7320e8feb2ef610b59d347c74d27 (diff)
downloadNim-2859069dbe1c943494cb6be299b200afa748cf52.tar.gz
fix #12274 (#19180)
Diffstat (limited to 'tests/parser')
-rw-r--r--tests/parser/t12274.nim9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/parser/t12274.nim b/tests/parser/t12274.nim
new file mode 100644
index 000000000..40c85f158
--- /dev/null
+++ b/tests/parser/t12274.nim
@@ -0,0 +1,9 @@
+var s: seq[int]
+s.add block:
+  let i = 1
+  i
+s.add try:
+  2
+except:
+  3
+doAssert s == @[1, 2]