summary refs log tree commit diff stats
path: root/tests/js
diff options
context:
space:
mode:
authorandri lim <jangko128@gmail.com>2017-07-17 13:07:47 +0700
committerAndreas Rumpf <rumpf_a@web.de>2017-07-17 08:07:47 +0200
commitc245cfc1fd4143553bcce99669a85f093e4b88a7 (patch)
treef1eefd0151de85773cf282d60dfa3a0713a34cce /tests/js
parent3c36aed100e9e8c80b752d22848b6238311c6515 (diff)
downloadNim-c245cfc1fd4143553bcce99669a85f093e4b88a7.tar.gz
fixes #5986 js backend failed to compile try ... except new syntax (#6116)
Diffstat (limited to 'tests/js')
-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