summary refs log tree commit diff stats
path: root/tests/js/ttryexceptnewsyntax.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/js/ttryexceptnewsyntax.nim')
-rw-r--r--tests/js/ttryexceptnewsyntax.nim13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/js/ttryexceptnewsyntax.nim b/tests/js/ttryexceptnewsyntax.nim
new file mode 100644
index 000000000..2573c3727
--- /dev/null
+++ b/tests/js/ttryexceptnewsyntax.nim
@@ -0,0 +1,13 @@
+discard """
+  output: '''hello'''
+"""
+
+type
+  MyException = ref Exception
+
+#bug #5986
+
+try:
+  raise MyException(msg: "hello")
+except MyException as e:
+  echo e.msg