summary refs log tree commit diff stats
path: root/tests/exception
diff options
context:
space:
mode:
authorDominik Picheta <dominikpicheta@gmail.com>2017-02-03 19:50:22 +0100
committerDominik Picheta <dominikpicheta@gmail.com>2017-02-03 19:50:22 +0100
commit1c233ba27a17830e325822fc27a12074eef49ccb (patch)
tree7314edbdedc47ffbf9efe3d3215af08ebf289ba7 /tests/exception
parent656da1f6a99c504eb5bf7c51b01b8fe00e2afd71 (diff)
downloadNim-1c233ba27a17830e325822fc27a12074eef49ccb.tar.gz
More progress towards a working #3691.
Diffstat (limited to 'tests/exception')
-rw-r--r--tests/exception/texcas.nim17
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/exception/texcas.nim b/tests/exception/texcas.nim
index 807f2c802..a00b09a8f 100644
--- a/tests/exception/texcas.nim
+++ b/tests/exception/texcas.nim
@@ -1,10 +1,25 @@
 discard """
-  output: '''Hello'''
+  output: '''Hello
+  Hello
+  '''
 """
 proc test[T]() =
   try:
     raise newException(T, "Hello")
   except T as foobar:
     echo(foobar.msg)
+  echo(declared(foobar))
+  doAssert(not declared(foobar))
+
+template testTemplate() =
+  try:
+    raise newException(Exception, "Hello")
+  except Exception as foobar:
+    echo(foobar.msg)
+  doAssert(not declared(foobar))
+
+proc test2() =
+  testTemplate()
+  doAssert(not declared(foobar))
 
 test[Exception]()