summary refs log tree commit diff stats
path: root/tests/errmsgs/undeclared_routime.nim
blob: 426507652c66d8fd8a2c1b26279658871a002678 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
discard """
cmd: '''nim c --hints:off $file'''
errormsg: "attempting to call routine: 'myiter'"
nimout: '''undeclared_routime.nim(13, 15) Error: attempting to call routine: 'myiter'
  found 'undeclared_routime.myiter(a: string)[declared in undeclared_routime.nim(10, 9)]' of kind 'iterator'
  found 'undeclared_routime.myiter()[declared in undeclared_routime.nim(11, 9)]' of kind 'iterator'
'''
"""

iterator myiter(a:string): int = discard
iterator myiter(): int = discard

let a = myiter(1)