Generalize signature comparison: checking for conflicting overloads.
Also, vararg parameter no longer conflicts with Array<out T> (CONFLICTING_JVM_DECLARATIONS is reported, can be avoided using @JvmName).
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
<!CONFLICTING_OVERLOADS!>fun foo(vararg <!UNUSED_PARAMETER!>x<!>: Int)<!> {}
|
||||
<!CONFLICTING_OVERLOADS!>fun foo(<!UNUSED_PARAMETER!>x<!>: IntArray)<!> {}
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun foo(vararg <!UNUSED_PARAMETER!>x<!>: Int)<!> {}
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun foo(<!UNUSED_PARAMETER!>x<!>: IntArray)<!> {}
|
||||
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun foo(vararg <!UNUSED_PARAMETER!>x<!>: Int?)<!> {}
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun foo(<!UNUSED_PARAMETER!>x<!>: Array<Int>)<!> {}
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun foo(<!UNUSED_PARAMETER!>x<!>: Array<Int>)<!> {}
|
||||
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun foo(vararg <!UNUSED_PARAMETER!>nn<!>: Number)<!> {}
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun foo(<!UNUSED_PARAMETER!>nn<!>: Array<out Number>)<!> {}
|
||||
@@ -2,5 +2,7 @@ package
|
||||
|
||||
public fun foo(/*0*/ x: kotlin.Array<kotlin.Int>): kotlin.Unit
|
||||
public fun foo(/*0*/ vararg x: kotlin.Int? /*kotlin.Array<out kotlin.Int?>*/): kotlin.Unit
|
||||
public fun foo(/*0*/ nn: kotlin.Array<out kotlin.Number>): kotlin.Unit
|
||||
public fun foo(/*0*/ vararg nn: kotlin.Number /*kotlin.Array<out kotlin.Number>*/): kotlin.Unit
|
||||
public fun foo(/*0*/ vararg x: kotlin.Int /*kotlin.IntArray*/): kotlin.Unit
|
||||
public fun foo(/*0*/ x: kotlin.IntArray): kotlin.Unit
|
||||
|
||||
Reference in New Issue
Block a user