Skip to content

Commit a37f089

Browse files
committed
Test arg order
1 parent 7eed544 commit a37f089

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/neg/i24745.scala

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,19 @@ extension (s: String)
33
def g_::(x: (suffix: String, n: Int)): String = s"$s${x.suffix * x.n}"
44
def ok_::(using suffix: String, n: Int): String = s"$s${suffix * n}"
55
def no_::(suffix: String, n: Int): String = s"$s${suffix * n}" // error
6+
def huh_::(using DummyImplicit)(suffix: String, n: Int): String = s"$s${suffix * n}"
7+
8+
def local =
9+
extension (s: String) def f_::(using DummyImplicit): String = s.reverse
10+
"hello, world".f_::
611

712
@main def Test =
813
println:
914
"hello, world".f_::
15+
println:
16+
f_::
17+
("hello, world")
18+
(using DummyImplicit.dummyImplicit)
1019
println:
1120
(suffix = "s", n = 3).g_::("hello, world")
1221
println:
@@ -15,3 +24,5 @@ extension (s: String)
1524
given String = "s"
1625
given Int = 3
1726
"hello, world".ok_::
27+
println:
28+
"hello, world".huh_::("s", 3)

0 commit comments

Comments
 (0)