More progress towards a working #3691.

This commit is contained in:
Dominik Picheta 2017-02-03 19:50:22 +01:00
commit 1c233ba27a
5 changed files with 23 additions and 10 deletions

View file

@ -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]()