Skip to content

Commit a52bdb6

Browse files
committed
tests: add a regression test
1 parent ff654c5 commit a52bdb6

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
discard """
2+
description: '''
3+
Regression test for argument expressions in call expressions passed to
4+
untyped parameters being typed when there exists another overload accepting
5+
a typed parameter in the same position.
6+
'''
7+
"""
8+
9+
proc test1(x: int, y: int) =
10+
discard
11+
12+
proc test2(x: int, y: int) =
13+
discard
14+
15+
template test2(x, y: untyped) =
16+
doAssert astToStr(x) == "test1(1 + 3, 2)"
17+
18+
test2(test1(1 + 3, 2), 1)

0 commit comments

Comments
 (0)