From de68d962360ff680108ed090fe3bf6cd665a2815 Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Mon, 8 Aug 2016 15:42:52 +0300 Subject: [PATCH] Minor, add test for obsolete issue #KT-12843 Obsolete --- .../tests/callableReference/bound/kt12843.kt | 6 ++++++ .../tests/callableReference/bound/kt12843.txt | 12 ++++++++++++ .../kotlin/checkers/DiagnosticsTestGenerated.java | 6 ++++++ 3 files changed, 24 insertions(+) create mode 100644 compiler/testData/diagnostics/tests/callableReference/bound/kt12843.kt create mode 100644 compiler/testData/diagnostics/tests/callableReference/bound/kt12843.txt diff --git a/compiler/testData/diagnostics/tests/callableReference/bound/kt12843.kt b/compiler/testData/diagnostics/tests/callableReference/bound/kt12843.kt new file mode 100644 index 00000000000..13eea2248bc --- /dev/null +++ b/compiler/testData/diagnostics/tests/callableReference/bound/kt12843.kt @@ -0,0 +1,6 @@ +class Foo { + fun bar() {} + fun f() = Unresolved()::bar +} + +val f: () -> Unit = Unresolved()::foo diff --git a/compiler/testData/diagnostics/tests/callableReference/bound/kt12843.txt b/compiler/testData/diagnostics/tests/callableReference/bound/kt12843.txt new file mode 100644 index 00000000000..d6f29028676 --- /dev/null +++ b/compiler/testData/diagnostics/tests/callableReference/bound/kt12843.txt @@ -0,0 +1,12 @@ +package + +public val f: () -> kotlin.Unit + +public final class Foo { + public constructor Foo() + public final fun bar(): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public final fun f(): kotlin.reflect.KFunction0 + 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/DiagnosticsTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java index fa930f72244..ef3b5a7651c 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java @@ -1775,6 +1775,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { doTest(fileName); } + @TestMetadata("kt12843.kt") + public void testKt12843() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/kt12843.kt"); + doTest(fileName); + } + @TestMetadata("object.kt") public void testObject() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/object.kt");