Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
65 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
t11921-alias.scala:16: error: reference to TT is ambiguous; | ||
it is both defined in object O and available as type TT in class C | ||
Since 2.13.11, symbols inherited from a superclass no longer shadow symbols defined in an outer scope. | ||
If shadowing was intended, write `this.TT`. | ||
Or use `-Ylegacy-binding` to enable the previous behavior everywhere. | ||
def n(x: TT) = x // ambiguous | ||
^ | ||
t11921-alias.scala:36: error: reference to c is ambiguous; | ||
it is both defined in class B and available as value c in class A | ||
Since 2.13.11, symbols inherited from a superclass no longer shadow symbols defined in an outer scope. | ||
If shadowing was intended, write `this.c`. | ||
Or use `-Ylegacy-binding` to enable the previous behavior everywhere. | ||
def n = c // ambiguous | ||
^ | ||
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
object t1 { | ||
class C[T] { type TT = T } | ||
object O { | ||
type TT = String | ||
class D extends C[TT] { | ||
def n(x: TT) = x // OK | ||
} | ||
} | ||
} | ||
|
||
object t2 { | ||
class C[T] { type TT <: T } | ||
object O { | ||
type TT = String | ||
class D extends C[TT] { | ||
def n(x: TT) = x // ambiguous | ||
} | ||
} | ||
} | ||
|
||
object t3 { | ||
trait Context | ||
class A[C <: Context](val c: C) | ||
class B(val c: Context) { b => | ||
val a = new A[c.type](c) { | ||
def n = c // OK | ||
} | ||
} | ||
} | ||
|
||
object t4 { | ||
trait Context | ||
class A[C <: Context](val c: C) | ||
class B(val c: Context) { b => | ||
val a = new A(c) { | ||
def n = c // ambiguous | ||
} | ||
} | ||
} |
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