summary refs log tree commit diff stats
path: root/tests/errmsgs/undeclared_routime2.nim
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2018-10-13 16:16:04 -0700
committerAndreas Rumpf <rumpf_a@web.de>2018-10-14 01:16:04 +0200
commiteb946f37a7c56fb64703357a67ed098ac8dfd936 (patch)
tree87c87454fad5a77a13b8db7d05a37222bdb030ec /tests/errmsgs/undeclared_routime2.nim
parent8232bd04f9edc4b3accb114c9bd6e60190b68396 (diff)
downloadNim-eb946f37a7c56fb64703357a67ed098ac8dfd936.tar.gz
fixes #8671; show helpful msg (lookup symbol, eg iterator) on 'attempting to call undeclared routine' error (#8786)
Diffstat (limited to 'tests/errmsgs/undeclared_routime2.nim')
-rw-r--r--tests/errmsgs/undeclared_routime2.nim9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/errmsgs/undeclared_routime2.nim b/tests/errmsgs/undeclared_routime2.nim
new file mode 100644
index 000000000..3e48b48f4
--- /dev/null
+++ b/tests/errmsgs/undeclared_routime2.nim
@@ -0,0 +1,9 @@
+discard """
+cmd: '''nim c --hints:off $file'''
+errormsg: "invalid pragma: myPragma"
+"""
+
+proc myPragma():int=discard
+iterator myPragma():int=discard
+proc myfun(a:int): int {.myPragma.} = 1
+let a = myfun(1)