Add test for KT-52020
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
$TESTDATA_DIR$/firDeprecationJava.kt
|
||||
$TESTDATA_DIR$/firDeprecationJava
|
||||
-Xuse-k2
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
@@ -0,0 +1,7 @@
|
||||
fun foo() {
|
||||
val thread = Thread()
|
||||
thread.stop()
|
||||
JavaClass().bar("", 1, 2.0)
|
||||
val baz = JavaClass().baz
|
||||
val jc = JavaClass("Omega")
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
warning: ATTENTION!
|
||||
This build uses experimental K2 compiler:
|
||||
-Xuse-k2
|
||||
compiler/testData/cli/jvm/firDeprecationJava.kt:3:12: warning: '@R|kotlin/Deprecated|(...) public final fun stop(): R|kotlin/Unit|
|
||||
' is deprecated. Deprecated in Java
|
||||
thread.stop()
|
||||
^
|
||||
compiler/testData/cli/jvm/firDeprecationJava.kt:4:17: warning: '@R|kotlin/Deprecated|(...) public open fun bar(a: R|ft<kotlin/String, kotlin/String?>|, b: R|kotlin/Int|, c: R|kotlin/Double|): R|ft<kotlin/String, kotlin/String?>|
|
||||
' is deprecated. Deprecated in Java
|
||||
JavaClass().bar("", 1, 2.0)
|
||||
^
|
||||
compiler/testData/cli/jvm/firDeprecationJava.kt:5:27: warning: '@R|kotlin/Deprecated|(...) public open field baz: R|ft<List, List?>|
|
||||
' is deprecated. Deprecated in Java
|
||||
val baz = JavaClass().baz
|
||||
^
|
||||
OK
|
||||
@@ -0,0 +1,13 @@
|
||||
public class JavaClass {
|
||||
@Deprecated
|
||||
public String bar(String a, int b, double c) {
|
||||
return a + b + c;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public List<String> baz = null;
|
||||
|
||||
public JavaClass() {}
|
||||
|
||||
public JavaClass(String x) {}
|
||||
}
|
||||
@@ -374,6 +374,11 @@ public class CliTestGenerated extends AbstractCliTest {
|
||||
runTest("compiler/testData/cli/jvm/firAllOpenPlugin.args");
|
||||
}
|
||||
|
||||
@TestMetadata("firDeprecationJava.args")
|
||||
public void testFirDeprecationJava() throws Exception {
|
||||
runTest("compiler/testData/cli/jvm/firDeprecationJava.args");
|
||||
}
|
||||
|
||||
@TestMetadata("firDfa.args")
|
||||
public void testFirDfa() throws Exception {
|
||||
runTest("compiler/testData/cli/jvm/firDfa.args");
|
||||
|
||||
Reference in New Issue
Block a user