summary refs log tree commit diff stats
path: root/tests/errmsgs/tcall_with_default_arg.nim
blob: 1cc86638f5564543b96469af1302567948523c24 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
discard """
outputsub: '''tcall_with_default_arg.nim(16) anotherFoo'''
exitcode: 1
"""
# issue: #5604

proc fail() =
  raise newException(ValueError, "dead")

proc getDefault(): int = 123

proc bar*(arg1: int = getDefault()) =
  fail()

proc anotherFoo(input: string) =
  bar()

anotherFoo("123")