-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10324 from lrytz/t11921-overloads-213
Deal with overloads in new ambiguity warning (2.13)
- Loading branch information
Showing
6 changed files
with
135 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,54 @@ | ||
t11921b.scala:135: error: could not find implicit value for parameter i: Int | ||
def u = t // doesn't compile in Scala 2 (maybe there's a ticket for that) | ||
^ | ||
t11921b.scala:11: warning: reference to x is ambiguous; | ||
it is both defined in the enclosing object Test and available in the enclosing class D as value x (defined in class C) | ||
Since Scala 3, symbols inherited from a superclass no longer shadow symbols defined in an outer scope. | ||
To continue using the symbol from the superclass, write `this.x`. | ||
it is both defined in the enclosing object Test and inherited in the enclosing class D as value x (defined in class C) | ||
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope. | ||
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.x`. | ||
Or use `-Wconf:msg=legacy-binding:s` to silence this warning. | ||
println(x) // error | ||
^ | ||
t11921b.scala:15: warning: reference to x is ambiguous; | ||
it is both defined in the enclosing object Test and available in the enclosing anonymous class as value x (defined in class C) | ||
Since Scala 3, symbols inherited from a superclass no longer shadow symbols defined in an outer scope. | ||
To continue using the symbol from the superclass, write `this.x`. | ||
it is both defined in the enclosing object Test and inherited in the enclosing anonymous class as value x (defined in class C) | ||
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope. | ||
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.x`. | ||
Or use `-Wconf:msg=legacy-binding:s` to silence this warning. | ||
println(x) // error | ||
^ | ||
t11921b.scala:26: warning: reference to y is ambiguous; | ||
it is both defined in the enclosing method c and available in the enclosing anonymous class as value y (defined in class D) | ||
Since Scala 3, symbols inherited from a superclass no longer shadow symbols defined in an outer scope. | ||
To continue using the symbol from the superclass, write `this.y`. | ||
it is both defined in the enclosing method c and inherited in the enclosing anonymous class as value y (defined in class D) | ||
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope. | ||
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.y`. | ||
Or use `-Wconf:msg=legacy-binding:s` to silence this warning. | ||
println(y) // error | ||
^ | ||
t11921b.scala:38: warning: reference to y is ambiguous; | ||
it is both defined in the enclosing method c and available in the enclosing class E as value y (defined in class D) | ||
Since Scala 3, symbols inherited from a superclass no longer shadow symbols defined in an outer scope. | ||
To continue using the symbol from the superclass, write `this.y`. | ||
it is both defined in the enclosing method c and inherited in the enclosing class E as value y (defined in class D) | ||
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope. | ||
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.y`. | ||
Or use `-Wconf:msg=legacy-binding:s` to silence this warning. | ||
println(y) // error | ||
^ | ||
t11921b.scala:75: warning: reference to x is ambiguous; | ||
it is both defined in the enclosing object Uhu and available in the enclosing class C as value x (defined in class A, inherited through parent class B) | ||
Since Scala 3, symbols inherited from a superclass no longer shadow symbols defined in an outer scope. | ||
To continue using the symbol from the superclass, write `this.x`. | ||
it is both defined in the enclosing object Uhu and inherited in the enclosing class C as value x (defined in class A, inherited through parent class B) | ||
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope. | ||
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.x`. | ||
Or use `-Wconf:msg=legacy-binding:s` to silence this warning. | ||
def t = x // ambiguous, message mentions parent B | ||
^ | ||
error: No warnings can be incurred under -Werror. | ||
5 warnings | ||
t11921b.scala:89: warning: reference to a is ambiguous; | ||
it is both defined in the enclosing class C and inherited in the enclosing trait J as method a (defined in trait I) | ||
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope. | ||
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.a`. | ||
Or use `-Wconf:msg=legacy-binding:s` to silence this warning. | ||
val t = a // error | ||
^ | ||
t11921b.scala:136: warning: reference to lo is ambiguous; | ||
it is both defined in the enclosing object test10 and inherited in the enclosing class C as value lo (defined in class P) | ||
In Scala 2, symbols inherited from a superclass shadow symbols defined in an outer scope. | ||
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `this.lo`. | ||
Or use `-Wconf:msg=legacy-binding:s` to silence this warning. | ||
def v = t(lo) // error | ||
^ | ||
7 warnings | ||
1 error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters