-
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 #10462 from lrytz/ambiguous-default
- Loading branch information
Showing
11 changed files
with
58 additions
and
55 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,31 +1,29 @@ | ||
t11921-alias.scala:18: warning: reference to TT is ambiguous; | ||
t11921-alias.scala:18: error: reference to TT is ambiguous; | ||
it is both defined in the enclosing object O and inherited in the enclosing class D as type TT (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.TT`. | ||
Or use `-Wconf:msg=legacy-binding:s` to silence this warning. | ||
def n(x: TT) = x // ambiguous | ||
^ | ||
t11921-alias.scala:38: warning: reference to c is ambiguous; | ||
t11921-alias.scala:38: error: reference to c is ambiguous; | ||
it is both defined in the enclosing class B and inherited in the enclosing anonymous class as value c (defined in class A) | ||
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.c`. | ||
Or use `-Wconf:msg=legacy-binding:s` to silence this warning. | ||
def n = c // ambiguous | ||
^ | ||
t11921-alias.scala:57: warning: reference to name is ambiguous; | ||
t11921-alias.scala:57: error: reference to name is ambiguous; | ||
it is both defined in the enclosing method m and inherited in the enclosing anonymous class as value name (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.name`. | ||
Or use `-Wconf:msg=legacy-binding:s` to silence this warning. | ||
println(name) | ||
^ | ||
t11921-alias.scala:67: warning: reference to name is ambiguous; | ||
t11921-alias.scala:67: error: reference to name is ambiguous; | ||
it is both defined in the enclosing method m and inherited in the enclosing anonymous class as value name (defined in class A, inherited through parent 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.name`. | ||
Or use `-Wconf:msg=legacy-binding:s` to silence this warning. | ||
println(name) | ||
^ | ||
error: No warnings can be incurred under -Werror. | ||
4 warnings | ||
1 error | ||
4 errors |
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,61 +1,60 @@ | ||
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; | ||
t11921b.scala:11: error: reference to x is ambiguous; | ||
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; | ||
t11921b.scala:15: error: reference to x is ambiguous; | ||
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; | ||
t11921b.scala:26: error: reference to y is ambiguous; | ||
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; | ||
t11921b.scala:38: error: reference to y is ambiguous; | ||
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`. | ||
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `E.this.y`. | ||
Or use `-Wconf:msg=legacy-binding:s` to silence this warning. | ||
println(y) // error | ||
^ | ||
t11921b.scala:65: warning: reference to global is ambiguous; | ||
t11921b.scala:65: error: reference to global is ambiguous; | ||
it is both defined in the enclosing package <empty> and inherited in the enclosing object D as value global (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.global`. | ||
Or use `-Wconf:msg=legacy-binding:s` to silence this warning. | ||
println(global) // error | ||
^ | ||
t11921b.scala:75: warning: reference to x is ambiguous; | ||
t11921b.scala:75: error: reference to x is ambiguous; | ||
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`. | ||
Such references are ambiguous in Scala 3. To continue using the inherited symbol, write `C.this.x`. | ||
Or use `-Wconf:msg=legacy-binding:s` to silence this warning. | ||
def t = x // ambiguous, message mentions parent B | ||
^ | ||
t11921b.scala:89: warning: reference to a is ambiguous; | ||
t11921b.scala:89: error: 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; | ||
t11921b.scala:136: error: 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 | ||
^ | ||
8 warnings | ||
1 error | ||
9 errors |
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,10 +1,8 @@ | ||
using-source3.scala:14: warning: reference to f is ambiguous; | ||
using-source3.scala:14: error: reference to f is ambiguous; | ||
it is both defined in the enclosing class D and inherited in the enclosing class E as method f (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.f`. | ||
Or use `-Wconf:msg=legacy-binding:s` to silence this warning. | ||
def g = f | ||
^ | ||
error: No warnings can be incurred under -Werror. | ||
1 warning | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
using-source3b.scala:13: warning: reference to f is ambiguous; | ||
using-source3b.scala:13: error: reference to f is ambiguous; | ||
it is both defined in the enclosing class D and inherited in the enclosing class E as method f (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.f`. | ||
Or use `-Wconf:msg=legacy-binding:s` to silence this warning. | ||
def g = f | ||
^ | ||
error: No warnings can be incurred under -Werror. | ||
1 warning | ||
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