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 #10220 from lrytz/pr10177
Inherited members no longer take precedence over outer definitions
- Loading branch information
Showing
26 changed files
with
490 additions
and
67 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
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
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
t11921-alias.scala:18: warning: reference to TT is ambiguous; | ||
it is both defined in the enclosing object O and available in the enclosing class D as type TT (defined in class C) | ||
Since 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.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; | ||
it is both defined in the enclosing class B and available in the enclosing anonymous class as value c (defined in class A) | ||
Since 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.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; | ||
it is both defined in the enclosing method m and available in the enclosing anonymous class as value name (defined in class C) | ||
Since 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.name`. | ||
Or use `-Wconf:msg=legacy-binding:s` to silence this warning. | ||
println(name) | ||
^ | ||
t11921-alias.scala:67: warning: reference to name is ambiguous; | ||
it is both defined in the enclosing method m and available in the enclosing anonymous class as value name (defined in class A, inherited through parent class C) | ||
Since 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.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 |
Oops, something went wrong.