diff --git a/compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/InheritJavaField.kt b/compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/InheritJavaField.kt new file mode 100644 index 00000000000..898673c30b5 --- /dev/null +++ b/compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/InheritJavaField.kt @@ -0,0 +1,4 @@ +package test + +public class InheritJavaField(): Super() { +} \ No newline at end of file diff --git a/compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/InheritJavaField.txt b/compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/InheritJavaField.txt new file mode 100644 index 00000000000..a588e84fa27 --- /dev/null +++ b/compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/InheritJavaField.txt @@ -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 +} diff --git a/compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/InheritJavaField/Super.java b/compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/InheritJavaField/Super.java new file mode 100644 index 00000000000..bfa0c5024c5 --- /dev/null +++ b/compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/InheritJavaField/Super.java @@ -0,0 +1,7 @@ +package test; + +public class Super { + public int field = 55; + private int privateField = 54; + public int method() { return 1; } +} \ No newline at end of file diff --git a/compiler/tests/org/jetbrains/jet/jvm/compiler/LoadJavaTestGenerated.java b/compiler/tests/org/jetbrains/jet/jvm/compiler/LoadJavaTestGenerated.java index 6050aeb97b5..3af6d9df723 100644 --- a/compiler/tests/org/jetbrains/jet/jvm/compiler/LoadJavaTestGenerated.java +++ b/compiler/tests/org/jetbrains/jet/jvm/compiler/LoadJavaTestGenerated.java @@ -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); } + @TestMetadata("InheritJavaField.kt") + public void testInheritJavaField() throws Exception { + doTestKotlinAgainstCompiledJavaWithKotlin("compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/InheritJavaField.kt"); + } + @TestMetadata("InheritParameterName.kt") public void testInheritParameterName() throws Exception { doTestKotlinAgainstCompiledJavaWithKotlin("compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/InheritParameterName.kt");