-
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.
Run the functional tests, to ensure they're correct (#444)
Run the functional tests, to ensure they're correct
- Loading branch information
Showing
161 changed files
with
952 additions
and
89 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
5 changes: 5 additions & 0 deletions
5
functional-tests/src/test/abstract-class-added-abstract-method-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(Usage.use(new A {})) | ||
} | ||
} |
6 changes: 5 additions & 1 deletion
6
functional-tests/src/test/abstract-class-added-abstract-method-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 |
---|---|---|
@@ -1 +1,5 @@ | ||
abstract class A | ||
abstract class A | ||
|
||
object Usage { | ||
def use(a: A) = () | ||
} |
4 changes: 4 additions & 0 deletions
4
functional-tests/src/test/abstract-class-added-abstract-method-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 |
---|---|---|
@@ -1,3 +1,7 @@ | ||
abstract class A { | ||
def foo(): Unit | ||
} | ||
|
||
object Usage { | ||
def use(a: A) = a.foo() | ||
} |
10 changes: 10 additions & 0 deletions
10
...c/test/abstract-class-extending-new-abstract-class-with-abstract-method-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,10 @@ | ||
object App { | ||
def main(args: Array[String]): Unit = { | ||
println(new A {}.foo(new A {})) | ||
println(new C) | ||
println(new D) | ||
|
||
println(new E { def bar(): E = new E { def bar() = this } }.bar()) | ||
println(new F) | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
...-tests/src/test/abstract-class-extending-new-trait-with-abstract-method-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 A {}.foo(new A {})) | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
...l-tests/src/test/abstract-class-extending-new-trait-with-abstract-method-ok/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 A { def foo = () }.foo) | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
...l-tests/src/test/abstract-class-extending-new-trait-with-concrete-method-ok/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 A {}.foo(new A {})) | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
...rc/test/abstract-class-inherits-new-abstract-class-with-abstract-method-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,6 @@ | ||
object App { | ||
def main(args: Array[String]): Unit = { | ||
println(Usage.use(new A {})) | ||
println(Usage.use(new B {})) | ||
} | ||
} |
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 |
---|---|---|
|
@@ -5,3 +5,6 @@ abstract class C extends B { | |
} | ||
abstract class D extends C | ||
|
||
object Usage { | ||
def use(a: A) = () | ||
} |
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
6 changes: 6 additions & 0 deletions
6
...l-tests/src/test/abstract-class-inherits-new-trait-with-abstract-method-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,6 @@ | ||
object App { | ||
def main(args: Array[String]): Unit = { | ||
println(Usage.useA(new A {}) + 10) | ||
println(Usage.useB(new B {}) + 11) | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
...al-tests/src/test/abstract-class-inherits-new-trait-with-abstract-method-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,2 +1,2 @@ | ||
abstract method foo()Unit in interface AA is inherited by class B in new version. | ||
abstract method foo()Unit in interface AA is inherited by class A in new version. | ||
abstract method foo()Int in interface AA is inherited by class A in new version. | ||
abstract method foo()Int in interface AA is inherited by class B in new version. |
7 changes: 6 additions & 1 deletion
7
...onal-tests/src/test/abstract-class-inherits-new-trait-with-abstract-method-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 |
---|---|---|
@@ -1,2 +1,7 @@ | ||
trait A | ||
abstract class B | ||
abstract class B | ||
|
||
object Usage { | ||
def useA(a: A) = 0 | ||
def useB(b: B) = 1 | ||
} |
7 changes: 6 additions & 1 deletion
7
...onal-tests/src/test/abstract-class-inherits-new-trait-with-abstract-method-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 |
---|---|---|
@@ -1,6 +1,11 @@ | ||
trait AA { | ||
def foo(): Unit | ||
def foo(): Int | ||
} | ||
|
||
trait A extends AA | ||
abstract class B extends A | ||
|
||
object Usage { | ||
def useA(a: A) = a.foo() + 1 | ||
def useB(b: B) = b.foo() + 2 | ||
} |
7 changes: 7 additions & 0 deletions
7
...-tests/src/test/abstract-class-inherits-new-trait-with-abstract-method2-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,7 @@ | ||
object App { | ||
def main(args: Array[String]): Unit = { | ||
println(Usage.useA(new A {}) + 10) | ||
println(Usage.useB(new B {}) + 11) | ||
println(Usage.useC(new C {}) + 12) | ||
} | ||
} |
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
3 changes: 3 additions & 0 deletions
3
functional-tests/src/test/added-abstract-class-in-new-version-ok/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,3 @@ | ||
object App { | ||
def main(args: Array[String]): Unit = () // v1 is (fundamentally) empty | ||
} |
3 changes: 3 additions & 0 deletions
3
functional-tests/src/test/added-new-trait-with-abstract-methods-ok/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,3 @@ | ||
object App { | ||
def main(args: Array[String]): Unit = () // v1 is empty | ||
} |
3 changes: 3 additions & 0 deletions
3
functional-tests/src/test/added-new-trait-with-concrete-methods-ok/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,3 @@ | ||
object App { | ||
def main(args: Array[String]): Unit = () // v1 is empty | ||
} |
3 changes: 3 additions & 0 deletions
3
functional-tests/src/test/added-trait-in-new-version-ok/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,3 @@ | ||
object App { | ||
def main(args: Array[String]): Unit = () // v1 is (fundamentally) empty | ||
} |
6 changes: 6 additions & 0 deletions
6
functional-tests/src/test/case-class-abstract-becomes-concrete-ok/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,6 @@ | ||
object App { | ||
def main(args: Array[String]): Unit = { | ||
println(new A() {}) | ||
println(new A() {}.copy()) | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
functional-tests/src/test/case-class-becomes-final-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 A { def baz = 2 }.baz) | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
functional-tests/src/test/case-class-concrete-becomes-abstract-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,6 @@ | ||
object App { | ||
def main(args: Array[String]): Unit = { | ||
println(new A) | ||
println(A()) | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
functional-tests/src/test/case-class-constructor-becomes-private-ok/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 A) | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
functional-tests/src/test/case-class-was-final-becomes-open-ok/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(A()) | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
functional-tests/src/test/class-abstract-becomes-concrete-ok/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 A {}) | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
functional-tests/src/test/class-added-abstract-method-in-new-version-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 A) | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
functional-tests/src/test/class-added-class-in-new-version-ok/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 A) | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
functional-tests/src/test/class-added-local-class-ok/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 A().f()) | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
functional-tests/src/test/class-added-local-method-ok/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 A().f) | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
functional-tests/src/test/class-added-method-in-new-version-ok/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 A().foo) | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
functional-tests/src/test/class-added-same-class-in-different-package-is-ok/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 me.A) | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
functional-tests/src/test/class-added-val-in-new-version-ok/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 A) | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
functional-tests/src/test/class-added-var-in-new-version-ok/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 A) | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
functional-tests/src/test/class-becomes-final-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 A { def baz = 2 }.baz) | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
functional-tests/src/test/class-becomes-object-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,6 @@ | ||
object App { | ||
def main(args: Array[String]): Unit = { | ||
println(new A) | ||
println(new A {}) | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
functional-tests/src/test/class-becomes-trait-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,6 @@ | ||
object App { | ||
def main(args: Array[String]): Unit = { | ||
println(new A) | ||
println(new A().foo) | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
functional-tests/src/test/class-changed-local-class-ok/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 A().f()) | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
functional-tests/src/test/class-changed-method-with-val-in-new-version-ok/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,7 @@ | ||
object App { | ||
def main(args: Array[String]): Unit = { | ||
println(new A().foo) | ||
println(new A { override def foo = 3 }.foo) | ||
println(new A { override val foo = 4 }.foo) | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
functional-tests/src/test/class-changed-method-with-var-in-new-version-ok/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,6 @@ | ||
object App { | ||
def main(args: Array[String]): Unit = { | ||
println(new A().foo) | ||
println(new A { override def foo = 3 }.foo) | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
functional-tests/src/test/class-changed-val-type-in-new-version-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,6 @@ | ||
object App { | ||
def main(args: Array[String]): Unit = { | ||
val x: Int = new A().foo | ||
println(x + 1) | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
functional-tests/src/test/class-changed-val-with-method-in-new-version-ok/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,6 @@ | ||
object App { | ||
def main(args: Array[String]): Unit = { | ||
println(new A().foo) | ||
println(new A { override val foo = 1 }.foo) | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
functional-tests/src/test/class-changed-var-type-in-new-version-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,7 @@ | ||
object App { | ||
def main(args: Array[String]): Unit = { | ||
val a = new A | ||
a.foo = 3 | ||
println(a.foo + 1) | ||
} | ||
} |
Oops, something went wrong.