-
Notifications
You must be signed in to change notification settings - Fork 71
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 #541 from dwijnand/forward-bincompat
Catch forward-incompatible method overriding in traits
- Loading branch information
Showing
12 changed files
with
71 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
in new version, classes mixing scala.collection.MapView need be recompiled to wire to the new static mixin forwarder method all super calls to method className()java.lang.String |
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
5 changes: 5 additions & 0 deletions
5
functional-tests/src/test/trait-adding-a-method-override-is-nok/app/App.scala
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,5 @@ | ||
object App { | ||
def main(args: Array[String]): Unit = { | ||
println(new B {}.n) | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
functional-tests/src/test/trait-adding-a-method-override-is-nok/forwards.txt
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 @@ | ||
in other version, classes mixing B need be recompiled to wire to the new static mixin forwarder method all super calls to method n()java.lang.String |
8 changes: 8 additions & 0 deletions
8
functional-tests/src/test/trait-adding-a-method-override-is-nok/v1/A.scala
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 @@ | ||
trait A { | ||
def m = "a" | ||
def n = "a" | ||
} | ||
|
||
trait B extends A { | ||
override def m = "b" | ||
} |
9 changes: 9 additions & 0 deletions
9
functional-tests/src/test/trait-adding-a-method-override-is-nok/v2/A.scala
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,9 @@ | ||
trait A { | ||
def m = "a" | ||
def n = "a" | ||
} | ||
|
||
trait B extends A { | ||
override def m = "b" | ||
override def n = "b" | ||
} |
1 change: 1 addition & 0 deletions
1
functional-tests/src/test/trait-deleting-concrete-methods-is-nok/problems.txt
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 +1,2 @@ | ||
synthetic static method $init$(B)Unit in interface B does not have a correspondent in new version | ||
in new version, classes mixing B need be recompiled to wire to the new static mixin forwarder method all super calls to method foo()Int |
2 changes: 1 addition & 1 deletion
2
functional-tests/src/test/trait-inheriting-from-class-nok/problems.txt
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 +1 @@ | ||
abstract method foo(Int)Int in interface A does not have a correspondent in new version | ||
method foo(Int)Int in interface A does not have a correspondent in new version |
3 changes: 2 additions & 1 deletion
3
functional-tests/src/test/trait-pushing-up-concrete-methods-is-nok/problems.txt
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 +1,2 @@ | ||
synthetic static method $init$(B)Unit in interface B does not have a correspondent in new version | ||
synthetic static method $init$(B)Unit in interface B does not have a correspondent in new version | ||
in new version, classes mixing B need be recompiled to wire to the new static mixin forwarder method all super calls to method foo()Int |