Test for KT-5326
#KT-5326 Obsolete
This commit is contained in:
@@ -0,0 +1,11 @@
|
|||||||
|
class A<T> {
|
||||||
|
fun size() = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
class Foo<T>(<!UNUSED_PARAMETER!>i<!>: Int)
|
||||||
|
|
||||||
|
public fun Foo<E>(c: A<E>) {
|
||||||
|
val <!UNUSED_VARIABLE!>a<!> = Foo<E>(c.size()) // Check no overload resolution ambiguity
|
||||||
|
val <!UNUSED_VARIABLE!>b<!>: Foo<E> = Foo(c.size()) // OK
|
||||||
|
val <!NAME_SHADOWING, UNUSED_VARIABLE!>c<!>: Foo<Int> = Foo(c.size()) // OK
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
public fun </*0*/ E> Foo(/*0*/ c: A<E>): kotlin.Unit
|
||||||
|
|
||||||
|
internal 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
|
||||||
|
internal final fun size(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
internal final class Foo</*0*/ T> {
|
||||||
|
public constructor Foo</*0*/ T>(/*0*/ i: kotlin.Int)
|
||||||
|
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
|
||||||
|
}
|
||||||
@@ -10704,6 +10704,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("kt5326.kt")
|
||||||
|
public void testKt5326() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt5326.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("kt549.kt")
|
@TestMetadata("kt549.kt")
|
||||||
public void testKt549() throws Exception {
|
public void testKt549() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt549.kt");
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt549.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user