From 808c9c6c2a93e6076c17b6f9bbab367df4c27772 Mon Sep 17 00:00:00 2001 From: SirOlaf <34164198+SirOlaf@users.noreply.github.com> Date: Sun, 23 Jul 2023 15:35:30 +0200 Subject: [PATCH] Testcase for #22008 (#22320) Testcase Co-authored-by: SirOlaf <> --- tests/exception/t22008.nim | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 tests/exception/t22008.nim diff --git a/tests/exception/t22008.nim b/tests/exception/t22008.nim new file mode 100644 index 0000000000..c0758e7b45 --- /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