summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorSirOlaf <34164198+SirOlaf@users.noreply.github.com>2023-07-23 15:35:30 +0200
committerGitHub <noreply@github.com>2023-07-23 21:35:30 +0800
commit808c9c6c2a93e6076c17b6f9bbab367df4c27772 (patch)
treefbed9c7169c778afea9ef2acfbe8ce039f373238
parentbe1844541c87a132ca076d8a8f741bec01825ba1 (diff)
downloadNim-808c9c6c2a93e6076c17b6f9bbab367df4c27772.tar.gz
Testcase for #22008 (#22320)
Testcase

Co-authored-by: SirOlaf <>
-rw-r--r--tests/exception/t22008.nim8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/exception/t22008.nim b/tests/exception/t22008.nim
new file mode 100644
index 000000000..c0758e7b4
--- /dev/null
+++ b/tests/exception/t22008.nim
@@ -0,0 +1,8 @@
+template detect(v: untyped) =
+  doAssert typeof(v) is int
+
+detect:
+  try:
+    raise (ref ValueError)()
+  except ValueError:
+    42
\ No newline at end of file