-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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 #10383 from SethTisue/fix-t8700b-on-jdk17-plus
adjust tests on JDK 17+ for `PermittedSubclasses` change
- Loading branch information
Showing
8 changed files
with
44 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Bar_2.scala:4: warning: match may not be exhaustive. | ||
It would fail on the following input: B | ||
def bar1(foo: Foo_1) = foo match { | ||
^ | ||
Bar_2.scala:8: warning: match may not be exhaustive. | ||
It would fail on the following inputs: (_ : Baz_1$1), (_ : Baz_1$2), B | ||
def bar2(foo: Baz_1) = foo match { | ||
^ | ||
error: No warnings can be incurred under -Werror. | ||
2 warnings | ||
1 error |
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,11 @@ | ||
// javaVersion: 17+ | ||
// scalac: -Werror | ||
object Bar { | ||
def bar1(foo: Foo_1) = foo match { | ||
case Foo_1.A => 1 | ||
} | ||
|
||
def bar2(foo: Baz_1) = foo match { | ||
case Baz_1.A => 1 | ||
} | ||
} |
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,12 @@ | ||
// javaVersion: 17+ | ||
public enum Baz_1 { | ||
A { | ||
public void baz1() {} | ||
}, | ||
B { | ||
public void baz1() {} | ||
}; | ||
|
||
public abstract void baz1(); | ||
public void baz2() {} | ||
} |
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 @@ | ||
// javaVersion: 17+ | ||
public enum Foo_1 { | ||
A, | ||
B | ||
} |
4 changes: 2 additions & 2 deletions
4
test/files/neg/t8700b.check → test/files/neg/t8700b-old.check
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
1 change: 1 addition & 0 deletions
1
test/files/neg/t8700b/Bar_2.scala → test/files/neg/t8700b-old/Bar_2.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,4 @@ | ||
// javaVersion: 8 | ||
// scalac: -Werror | ||
object Bar { | ||
def bar1(foo: Foo_1) = foo match { | ||
|
1 change: 1 addition & 0 deletions
1
test/files/neg/t8700b/Baz_1.java → test/files/neg/t8700b-old/Baz_1.java
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,4 @@ | ||
// javaVersion: 8 | ||
public enum Baz_1 { | ||
A { | ||
public void baz1() {} | ||
|
1 change: 1 addition & 0 deletions
1
test/files/neg/t8700b/Foo_1.java → test/files/neg/t8700b-old/Foo_1.java
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,4 @@ | ||
// javaVersion: 8 | ||
public enum Foo_1 { | ||
A, | ||
B | ||
|