diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/proc/typed.nim | 7 | ||||
-rw-r--r-- | tests/proc/untyped.nim | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/proc/typed.nim b/tests/proc/typed.nim new file mode 100644 index 000000000..2e8117634 --- /dev/null +++ b/tests/proc/typed.nim @@ -0,0 +1,7 @@ +discard """ + errormsg: "'typed' is only allowed in templates and macros" + line: 6 +""" + +proc fun(x:typed)=discard +fun(10) diff --git a/tests/proc/untyped.nim b/tests/proc/untyped.nim new file mode 100644 index 000000000..f8b3ead7b --- /dev/null +++ b/tests/proc/untyped.nim @@ -0,0 +1,7 @@ +discard """ + errormsg: "'untyped' is only allowed in templates and macros" + line: 6 +""" + +proc fun(x:untyped)=discard +fun(10) |