Check conflicting overloads for generic signatures.
This commit is contained in:
+34
@@ -0,0 +1,34 @@
|
||||
<!CONFLICTING_OVERLOADS!>fun <T1> test1(x: List<T1>)<!> = x
|
||||
<!CONFLICTING_OVERLOADS!>fun <T2> test1(x: List<T2>)<!> = x
|
||||
|
||||
<!CONFLICTING_OVERLOADS!>fun <T1> List<T1>.test1a()<!> {}
|
||||
<!CONFLICTING_OVERLOADS!>fun <T2> List<T2>.test1a()<!> {}
|
||||
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun <T> test2(x: List<T>)<!> = x
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun test2(x: List<String>)<!> = x
|
||||
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun <T> List<T>.test2a()<!> {}
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun List<String>.test2a()<!> {}
|
||||
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun <T : Any> test3(x: List<T>)<!> = x
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun test3(x: List<Any>)<!> = x
|
||||
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun <T : Any> List<T>.test3a()<!> {}
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun List<Any>.test3a()<!> {}
|
||||
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun <T> test4(x: Map<T, T>)<!> = x
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun <K, V> test4(x: Map<K, V>)<!> = x
|
||||
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun <T> Map<T, T>.test4a()<!> {}
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun <K, V> Map<K, V>.test4a()<!> {}
|
||||
|
||||
class Inv<T>
|
||||
|
||||
<!CONFLICTING_OVERLOADS!>fun <T> test5(x: Inv<T>)<!> = x
|
||||
<!CONFLICTING_OVERLOADS!>fun <T> test5(x: Inv<out T>)<!> = x
|
||||
|
||||
fun <T> test6(x: Array<T>) = x
|
||||
fun test6(x: Array<String>) = x
|
||||
|
||||
fun <T> test7(x: Inv<T>) = x
|
||||
fun <T> Inv<T>.test7() {}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package
|
||||
|
||||
public fun </*0*/ T1> test1(/*0*/ x: kotlin.collections.List<T1>): kotlin.collections.List<T1>
|
||||
public fun </*0*/ T2> test1(/*0*/ x: kotlin.collections.List<T2>): kotlin.collections.List<T2>
|
||||
public fun </*0*/ T> test2(/*0*/ x: kotlin.collections.List<T>): kotlin.collections.List<T>
|
||||
public fun test2(/*0*/ x: kotlin.collections.List<kotlin.String>): kotlin.collections.List<kotlin.String>
|
||||
public fun </*0*/ T : kotlin.Any> test3(/*0*/ x: kotlin.collections.List<T>): kotlin.collections.List<T>
|
||||
public fun test3(/*0*/ x: kotlin.collections.List<kotlin.Any>): kotlin.collections.List<kotlin.Any>
|
||||
public fun </*0*/ K, /*1*/ V> test4(/*0*/ x: kotlin.collections.Map<K, V>): kotlin.collections.Map<K, V>
|
||||
public fun </*0*/ T> test4(/*0*/ x: kotlin.collections.Map<T, T>): kotlin.collections.Map<T, T>
|
||||
public fun </*0*/ T> test5(/*0*/ x: Inv<T>): Inv<T>
|
||||
public fun </*0*/ T> test5(/*0*/ x: Inv<out T>): Inv<out T>
|
||||
public fun </*0*/ T> test6(/*0*/ x: kotlin.Array<T>): kotlin.Array<T>
|
||||
public fun test6(/*0*/ x: kotlin.Array<kotlin.String>): kotlin.Array<kotlin.String>
|
||||
public fun </*0*/ T> test7(/*0*/ x: Inv<T>): Inv<T>
|
||||
public fun </*0*/ T1> kotlin.collections.List<T1>.test1a(): kotlin.Unit
|
||||
public fun </*0*/ T2> kotlin.collections.List<T2>.test1a(): kotlin.Unit
|
||||
public fun </*0*/ T> kotlin.collections.List<T>.test2a(): kotlin.Unit
|
||||
public fun kotlin.collections.List<kotlin.String>.test2a(): kotlin.Unit
|
||||
public fun </*0*/ T : kotlin.Any> kotlin.collections.List<T>.test3a(): kotlin.Unit
|
||||
public fun kotlin.collections.List<kotlin.Any>.test3a(): kotlin.Unit
|
||||
public fun </*0*/ K, /*1*/ V> kotlin.collections.Map<K, V>.test4a(): kotlin.Unit
|
||||
public fun </*0*/ T> kotlin.collections.Map<T, T>.test4a(): kotlin.Unit
|
||||
public fun </*0*/ T> Inv<T>.test7(): kotlin.Unit
|
||||
|
||||
public final class Inv</*0*/ T> {
|
||||
public constructor Inv</*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
|
||||
}
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
class Aaa() {
|
||||
<!CONFLICTING_OVERLOADS!>fun f()<!> = 1
|
||||
<!CONFLICTING_OVERLOADS!>fun <P> f()<!> = 1
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun f()<!> = 1
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun <P> f()<!> = 1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user