Added test for KT-2381 Can't resolve references to fields inherited from Java class when used Kotlin class is loaded from bytecode
#KT-2381 obsolete
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
public class InheritJavaField(): Super() {
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
public final class InheritJavaField : test.Super {
|
||||||
|
public constructor InheritJavaField()
|
||||||
|
public final override /*1*/ /*fake_override*/ var field: kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun method(): kotlin.Int
|
||||||
|
}
|
||||||
|
|
||||||
|
public open class Super : java.lang.Object {
|
||||||
|
public constructor Super()
|
||||||
|
public final var field: kotlin.Int
|
||||||
|
public open fun method(): kotlin.Int
|
||||||
|
}
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
package test;
|
||||||
|
|
||||||
|
public class Super {
|
||||||
|
public int field = 55;
|
||||||
|
private int privateField = 54;
|
||||||
|
public int method() { return 1; }
|
||||||
|
}
|
||||||
@@ -3172,6 +3172,11 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest {
|
|||||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin"), Pattern.compile("^(.+)\\.kt$"), false);
|
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin"), Pattern.compile("^(.+)\\.kt$"), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("InheritJavaField.kt")
|
||||||
|
public void testInheritJavaField() throws Exception {
|
||||||
|
doTestKotlinAgainstCompiledJavaWithKotlin("compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/InheritJavaField.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("InheritParameterName.kt")
|
@TestMetadata("InheritParameterName.kt")
|
||||||
public void testInheritParameterName() throws Exception {
|
public void testInheritParameterName() throws Exception {
|
||||||
doTestKotlinAgainstCompiledJavaWithKotlin("compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/InheritParameterName.kt");
|
doTestKotlinAgainstCompiledJavaWithKotlin("compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/InheritParameterName.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user