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");