diff --git a/compiler/testData/diagnostics/tests/callableReference/bound/noThisInSuperCall.kt b/compiler/testData/diagnostics/tests/callableReference/bound/noThisInSuperCall.kt new file mode 100644 index 00000000000..8111828112b --- /dev/null +++ b/compiler/testData/diagnostics/tests/callableReference/bound/noThisInSuperCall.kt @@ -0,0 +1,3 @@ +open class A(val x: Any) + +class B : A(this::class) diff --git a/compiler/testData/diagnostics/tests/callableReference/bound/noThisInSuperCall.txt b/compiler/testData/diagnostics/tests/callableReference/bound/noThisInSuperCall.txt new file mode 100644 index 00000000000..20eb685fc35 --- /dev/null +++ b/compiler/testData/diagnostics/tests/callableReference/bound/noThisInSuperCall.txt @@ -0,0 +1,17 @@ +package + +public open class A { + public constructor A(/*0*/ x: kotlin.Any) + public final val x: kotlin.Any + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public final class B : A { + public constructor B() + public final override /*1*/ /*fake_override*/ val x: kotlin.Any + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + 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 6e151f771fa..a9d696861d4 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java @@ -1793,6 +1793,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { doTest(fileName); } + @TestMetadata("noThisInSuperCall.kt") + public void testNoThisInSuperCall() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/noThisInSuperCall.kt"); + doTest(fileName); + } + @TestMetadata("object.kt") public void testObject() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/object.kt");