-
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 #10291 from som-snytt/issue/12714-kotlin-deprecation
Honor more deprecations under separate compilation
- Loading branch information
Showing
17 changed files
with
85 additions
and
43 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
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 |
---|---|---|
@@ -1,2 +1,28 @@ | ||
Note: deprecation/Use_2.java uses or overrides a deprecated API. | ||
Note: Recompile with -Xlint:deprecation for details. | ||
Test_1.scala:7: warning: variable i in class Defs is deprecated | ||
val u = d.i + 1 | ||
^ | ||
Test_1.scala:8: warning: variable i in class Defs is deprecated | ||
d.i = 2 | ||
^ | ||
Test_1.scala:9: warning: method bar in class Defs is deprecated | ||
val v = d.bar() | ||
^ | ||
Test_1.scala:10: warning: class Inner in class Defs is deprecated | ||
val i = new d.Inner | ||
^ | ||
deprecation/Use_2.java:7: warning: [deprecation] Test.Inner in Test has been deprecated | ||
Test.Inner a = u.new Inner(); | ||
^ | ||
deprecation/Use_2.java:7: warning: [deprecation] Test.Inner in Test has been deprecated | ||
Test.Inner a = u.new Inner(); | ||
^ | ||
deprecation/Use_2.java:8: warning: [deprecation] f() in Test.Inner has been deprecated | ||
int i = a.f(); | ||
^ | ||
deprecation/Use_2.java:9: warning: [deprecation] g() in Test.Inner has been deprecated | ||
int j = a.g(); | ||
^ | ||
deprecation/Use_2.java:10: warning: [deprecation] g_$eq(int) in Test.Inner has been deprecated | ||
a.g_$eq(5); | ||
^ | ||
5 warnings |
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,6 @@ | ||
|
||
// scalac: -Xlint:deprecation | ||
|
||
class Test { | ||
def test: Unit = { | ||
val d = new Defs | ||
|
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 |
---|---|---|
@@ -1,9 +1,12 @@ | ||
Test_2.scala:2: warning: class DeprecatedClass in package p1 is deprecated | ||
object Test extends p1.DeprecatedClass { | ||
^ | ||
Test_2.scala:3: warning: class DeprecatedClass in package p1 is deprecated | ||
def useC = p1.DeprecatedClass.foo | ||
^ | ||
Test_2.scala:4: warning: method foo in class DeprecatedMethod is deprecated | ||
def useM = p1.DeprecatedMethod.foo | ||
^ | ||
error: No warnings can be incurred under -Werror. | ||
2 warnings | ||
3 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// scalac: -Xlint:deprecation -Werror | ||
object Test { | ||
object Test extends p1.DeprecatedClass { | ||
def useC = p1.DeprecatedClass.foo | ||
def useM = p1.DeprecatedMethod.foo | ||
} |
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,9 +1,12 @@ | ||
Test.scala:4: warning: class DeprecatedClass in package p1 is deprecated | ||
object Test extends p1.DeprecatedClass { | ||
^ | ||
Test.scala:5: warning: class DeprecatedClass in package p1 is deprecated | ||
def useC = p1.DeprecatedClass.foo | ||
^ | ||
Test.scala:6: warning: method foo in class DeprecatedMethod is deprecated | ||
def useM = p1.DeprecatedMethod.foo | ||
^ | ||
error: No warnings can be incurred under -Werror. | ||
2 warnings | ||
3 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// scalac: -Xfatal-warnings -deprecation | ||
// scalac: -Werror -Xlint:deprecation | ||
|
||
// Joint-compilation copy of test/files/neg/t10752/Test_2.scala | ||
object Test { | ||
object Test extends p1.DeprecatedClass { | ||
def useC = p1.DeprecatedClass.foo | ||
def useM = p1.DeprecatedMethod.foo | ||
} |