fixes #8671; show helpful msg (lookup symbol, eg iterator) on 'attempting to call undeclared routine' error (#8786)

This commit is contained in:
Timothee Cour 2018-10-13 16:16:04 -07:00 • committed by Andreas Rumpf
commit eb946f37a7
10 changed files with 98 additions and 10 deletions

View 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]()