File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 1+ -- Warning: tests/warn/scalatest-overload-3.7.scala:22:18 --------------------------------------------------------------
2+ 22 | "hello world" should endWith ("world") // warn: overloading resolution change
3+ | ^^^^^^
4+ | Overloading resolution for arguments (("hello world" : String))(EndWithWord) between alternatives
5+ | [T](leftSideValue: T)(word: EndWithWord)(using x$3: T <:< String): Unit
6+ | [T](leftSideValue: T)(word: StartWithWord)(using x$3: T <:< String): Unit
7+ | (leftSideString: String)(body: TestBody2): Unit
8+ | (leftSideString: String)(body: TestBody1): Unit
9+ | will change.
10+ | Current choice : [T](leftSideValue: T)(word: EndWithWord)(using x$3: T <:< String): Unit
11+ | New choice from Scala 3.7: none
12+ |
13+ | where: T is a type variable with constraint >: ("hello world" : String)
Original file line number Diff line number Diff line change 1- import scala .language .`3.8 `
1+ import scala .language .`3.7 `
22
33class TestBody1
44class TestBody2
@@ -19,4 +19,4 @@ class Matchers:
1919
2020class Test extends Matchers :
2121 def test (): Unit =
22- " hello world" should endWith (" world" ) // error
22+ " hello world" should endWith (" world" ) // warn: overloading resolution change
You can’t perform that action at this time.
0 commit comments