diff --git a/compiler/testData/diagnostics/tests/override/typeParameters/kt9850.kt b/compiler/testData/diagnostics/tests/override/typeParameters/kt9850.kt new file mode 100644 index 00000000000..413c36eebd3 --- /dev/null +++ b/compiler/testData/diagnostics/tests/override/typeParameters/kt9850.kt @@ -0,0 +1,8 @@ +abstract class Base { + abstract fun foo(list: List) where T : Number, T : Comparable +} + +class Derived : Base() { + override fun foo(list: List) where T : Number, T : Comparable { + } +} diff --git a/compiler/testData/diagnostics/tests/override/typeParameters/kt9850.txt b/compiler/testData/diagnostics/tests/override/typeParameters/kt9850.txt new file mode 100644 index 00000000000..d7e769d51c1 --- /dev/null +++ b/compiler/testData/diagnostics/tests/override/typeParameters/kt9850.txt @@ -0,0 +1,17 @@ +package + +public abstract class Base { + public constructor Base() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public abstract fun foo(/*0*/ list: kotlin.List): kotlin.Unit where T : kotlin.Comparable + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public final class Derived : Base { + public constructor Derived() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ fun foo(/*0*/ list: kotlin.List): kotlin.Unit where T : kotlin.Comparable + 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 8113e8add9d..5dc718ea9f5 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/JetDiagnosticsTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/JetDiagnosticsTestGenerated.java @@ -11102,6 +11102,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest { doTest(fileName); } + @TestMetadata("kt9850.kt") + public void testKt9850() throws Exception { + String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/typeParameters/kt9850.kt"); + doTest(fileName); + } + @TestMetadata("simpleVisitorTwoAccepts.kt") public void testSimpleVisitorTwoAccepts() throws Exception { String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/typeParameters/simpleVisitorTwoAccepts.kt");