tcall_with_default_arg.nim 290 B

12345678910111213141516171819
  1. discard """
  2. outputsub: '''tcall_with_default_arg.nim(8) fail'''
  3. exitcode: 1
  4. """
  5. # issue: #5604
  6. proc fail() =
  7. raise newException(ValueError, "dead")
  8. proc getDefault(): int = 123
  9. proc bar*(arg1: int = getDefault()) =
  10. fail()
  11. proc anotherFoo(input: string) =
  12. bar()
  13. anotherFoo("123")