Add test for obsolete issue
#KT-9571 Obsolete
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
|||||||
|
class A<T>
|
||||||
|
fun <T> A<T>.foo(): Collection<T> = null!!
|
||||||
|
|
||||||
|
fun main(a: A<*>, a1: A<out CharSequence>) {
|
||||||
|
// see KT-9571
|
||||||
|
for (i in a.foo()) { }
|
||||||
|
for (i: Any? in a.foo()) { }
|
||||||
|
|
||||||
|
for (i in a1.foo()) { }
|
||||||
|
for (i: CharSequence in a1.foo()) { }
|
||||||
|
}
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
public fun main(/*0*/ a: A<*>, /*1*/ a1: A<out kotlin.CharSequence>): kotlin.Unit
|
||||||
|
public fun </*0*/ T> A<T>.foo(): kotlin.collections.Collection<T>
|
||||||
|
|
||||||
|
public final class A</*0*/ T> {
|
||||||
|
public constructor 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
|
||||||
|
}
|
||||||
@@ -7322,6 +7322,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("iterateOnExtension.kt")
|
||||||
|
public void testIterateOnExtension() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/iterateOnExtension.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("kt7296.kt")
|
@TestMetadata("kt7296.kt")
|
||||||
public void testKt7296() throws Exception {
|
public void testKt7296() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/kt7296.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/kt7296.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user