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
11
tests/errmsgs/undeclared_routime_compiles.nim
Normal file
11
tests/errmsgs/undeclared_routime_compiles.nim
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# D20180828T234921:here
|
||||
template foo*(iter: untyped): untyped =
|
||||
when compiles(iter.unexistingField): 0
|
||||
elif compiles(iter.len): 1
|
||||
else: 2
|
||||
|
||||
proc foo[A]()=
|
||||
let a2 = @[10, 11]
|
||||
let a3 = foo(pairs(a2))
|
||||
|
||||
foo[int]()
|
||||
Loading…
Add table
Add a link
Reference in a new issue