WIP: as with generics.

This commit is contained in:
Dominik Picheta
2017-02-02 21:36:49 +01:00
parent 814f527175
commit 656da1f6a9
5 changed files with 21 additions and 10 deletions

View File

@@ -1,10 +1,10 @@
discard """
output: '''Hello'''
"""
proc test[T]() =
try:
raise newException(T, "Hello")
except T as foobar:
echo(foobar.msg)
try:
raise newException(Exception, "Hello")
except Exception as foobar:
echo(foobar.msg)
test[Exception]()