-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The reason is that bridges are allowed to participate in overriding relationships. This commit does the same scalac does, that is, prevent bridges from participation in such relationships. This is applied in all cases except from when bridges are generated: bridges are allowed to override other bridges. This is necessary to support abstract overrides where such bridges are generated when type parameters are involved in the return types of the overridden method.
- Loading branch information
1 parent
24946d8
commit 9fdeb94
Showing
5 changed files
with
21 additions
and
4 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
abstract class A { | ||
public abstract Object f(); | ||
|
||
public static abstract class B extends A { | ||
@Override | ||
public abstract String f(); | ||
} | ||
} |
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,8 @@ | ||
class C extends A.B { | ||
def f() = "hello" | ||
} | ||
|
||
object Main extends App { | ||
val c: A = new C | ||
println(c.f()) | ||
} |