Skip to content

Commit 08a0115

Browse files
committed
tests: add a specification test
1 parent 3a1739e commit 08a0115

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
discard """
2+
description: '''
3+
Multiple parameters can use an underscore as the name, making the
4+
parameters inaccessible
5+
'''
6+
"""
7+
8+
proc test1(_: int) = discard
9+
test1(1)
10+
11+
proc test2(_: int, _: int) = discard
12+
test2(1, 2)
13+
14+
proc mixed(a: int, _: int) = discard
15+
mixed(1, 2)
16+
17+
## The same is true for parameters of anonymous procedures.
18+
let anon = proc(_, _, _: int) = discard
19+
anon(1, 2, 3)

0 commit comments

Comments
 (0)