[FE] Add test for KT-51016
This commit is contained in:
committed by
teamcity
parent
b32887380a
commit
1da52ab197
+6
@@ -15433,6 +15433,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
|
|||||||
runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt49661.kt");
|
runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt49661.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt51016.kt")
|
||||||
|
public void testKt51016() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt51016.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("nullableEmptyIntersection.kt")
|
@TestMetadata("nullableEmptyIntersection.kt")
|
||||||
public void testNullableEmptyIntersection() throws Exception {
|
public void testNullableEmptyIntersection() throws Exception {
|
||||||
|
|||||||
+6
@@ -15433,6 +15433,12 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
|
|||||||
runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt49661.kt");
|
runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt49661.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt51016.kt")
|
||||||
|
public void testKt51016() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt51016.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("nullableEmptyIntersection.kt")
|
@TestMetadata("nullableEmptyIntersection.kt")
|
||||||
public void testNullableEmptyIntersection() throws Exception {
|
public void testNullableEmptyIntersection() throws Exception {
|
||||||
|
|||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
interface A<T>
|
||||||
|
interface B<T> : A<T>
|
||||||
|
|
||||||
|
fun <T : Comparable<T>, S : T?> B<in S>.foo(t: T) {}
|
||||||
|
fun <T : Comparable<T>, S : T?> A<in S>.foo(other: A<in S>) {}
|
||||||
|
|
||||||
|
interface C<T> : B<T>, Comparable<C<*>>
|
||||||
|
|
||||||
|
fun test(x: C<Long?>) {
|
||||||
|
x.foo(x) // OVERLOAD_RESOLUTION_AMBIGUITY, shoub be OK
|
||||||
|
}
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
interface A<T>
|
||||||
|
interface B<T> : A<T>
|
||||||
|
|
||||||
|
fun <T : Comparable<T>, S : T?> B<in S>.foo(t: T) {}
|
||||||
|
fun <T : Comparable<T>, S : T?> A<in S>.foo(other: A<in S>) {}
|
||||||
|
|
||||||
|
interface C<T> : B<T>, Comparable<C<*>>
|
||||||
|
|
||||||
|
fun test(x: C<Long?>) {
|
||||||
|
x.<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!>(x) // OVERLOAD_RESOLUTION_AMBIGUITY, shoub be OK
|
||||||
|
}
|
||||||
+24
@@ -0,0 +1,24 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
public fun test(/*0*/ x: C<kotlin.Long?>): kotlin.Unit
|
||||||
|
public fun </*0*/ T : kotlin.Comparable<T>, /*1*/ S : T?> A<in S>.foo(/*0*/ other: A<in S>): kotlin.Unit
|
||||||
|
public fun </*0*/ T : kotlin.Comparable<T>, /*1*/ S : T?> B<in S>.foo(/*0*/ t: T): kotlin.Unit
|
||||||
|
|
||||||
|
public interface A</*0*/ T> {
|
||||||
|
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 interface B</*0*/ T> : A<T> {
|
||||||
|
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 interface C</*0*/ T> : B<T>, kotlin.Comparable<C<*>> {
|
||||||
|
public abstract override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: C<*>): kotlin.Int
|
||||||
|
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
Generated
+6
@@ -15439,6 +15439,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt49661.kt");
|
runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt49661.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt51016.kt")
|
||||||
|
public void testKt51016() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/emptyIntersectionTypes/kt51016.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("nullableEmptyIntersection.kt")
|
@TestMetadata("nullableEmptyIntersection.kt")
|
||||||
public void testNullableEmptyIntersection() throws Exception {
|
public void testNullableEmptyIntersection() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user