summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorArne Döring <arne.doering@gmx.net>2019-03-21 06:54:42 +0100
committerAndreas Rumpf <rumpf_a@web.de>2019-03-21 06:54:42 +0100
commit3794338aba2a085bc72761307b8849fff07ed429 (patch)
treec64a05373dc3bb4e98ddf26411f92ae6c40f28ee /tests
parent514674cb38e46b93d26f78e87244e1cfef67ccdb (diff)
downloadNim-3794338aba2a085bc72761307b8849fff07ed429.tar.gz
Lineinfo fix (#10871)
Diffstat (limited to 'tests')
-rw-r--r--tests/errmsgs/tcall_with_default_arg.nim18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/errmsgs/tcall_with_default_arg.nim b/tests/errmsgs/tcall_with_default_arg.nim
new file mode 100644
index 000000000..1cc86638f
--- /dev/null
+++ b/tests/errmsgs/tcall_with_default_arg.nim
@@ -0,0 +1,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")