Skip to content

Commit 707f0c9

Browse files
committed
Status quo extension parameters
1 parent c7c3170 commit 707f0c9

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/neg/i24745.scala

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
extension (s: String)
2+
def f_::(using DummyImplicit): String = s.reverse // error
3+
def g_::(x: (suffix: String, n: Int)): String = s"$s${x.suffix * x.n}"
4+
def ok_::(using suffix: String, n: Int): String = s"$s${suffix * n}" // error
5+
def no_::(suffix: String, n: Int): String = s"$s${suffix * n}" // error
6+
7+
@main def Test =
8+
println:
9+
"hello, world".f_::
10+
println:
11+
(suffix = "s", n = 3).g_::("hello, world")
12+
println:
13+
"hello, world" g_:: ("s", 3)
14+
println:
15+
given String = "s"
16+
given Int = 3
17+
"hello, world".ok_::

0 commit comments

Comments
 (0)