fixes #8671; show helpful msg (lookup symbol, eg iterator) on 'attempting to call undeclared routine' error (#8786)
This commit is contained in:
parent
8232bd04f9
commit
eb946f37a7
10 changed files with 98 additions and 10 deletions
9
tests/errmsgs/undeclared_routime2.nim
Normal file
9
tests/errmsgs/undeclared_routime2.nim
Normal file
|
|
@ -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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue