From d41e01c0e4dc18823b41af005c91175be1ad6e2c Mon Sep 17 00:00:00 2001 From: Valentin Kipyatkov Date: Tue, 18 Aug 2015 19:04:03 +0300 Subject: [PATCH] Added a test --- .../tests/syntheticExtensions/javaProperties/GetA.kt | 10 ++++++++++ .../tests/syntheticExtensions/javaProperties/GetA.txt | 11 +++++++++++ .../kotlin/checkers/JetDiagnosticsTestGenerated.java | 6 ++++++ 3 files changed, 27 insertions(+) create mode 100644 compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/GetA.kt create mode 100644 compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/GetA.txt diff --git a/compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/GetA.kt b/compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/GetA.kt new file mode 100644 index 00000000000..cd35f02613d --- /dev/null +++ b/compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/GetA.kt @@ -0,0 +1,10 @@ +// FILE: KotlinFile.kt +fun foo(javaClass: JavaClass) { + javaClass.a + javaClass.A +} + +// FILE: JavaClass.java +public class JavaClass { + public int getA() { return 1; } +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/GetA.txt b/compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/GetA.txt new file mode 100644 index 00000000000..afed27f2c6b --- /dev/null +++ b/compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/GetA.txt @@ -0,0 +1,11 @@ +package + +internal fun foo(/*0*/ javaClass: JavaClass): kotlin.Unit + +public open class JavaClass { + public constructor JavaClass() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open fun getA(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/JetDiagnosticsTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/JetDiagnosticsTestGenerated.java index f80479d1c11..3d0ba00f675 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/JetDiagnosticsTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/JetDiagnosticsTestGenerated.java @@ -14627,6 +14627,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest { doTest(fileName); } + @TestMetadata("GetA.kt") + public void testGetA() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/GetA.kt"); + doTest(fileName); + } + @TestMetadata("Getter.kt") public void testGetter() throws Exception { String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/Getter.kt");