Prohibit renaming operator to another operator on import.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// FILE: a.kt
|
||||
package a
|
||||
|
||||
interface A
|
||||
|
||||
operator fun A.plus(other: A): A = this
|
||||
|
||||
// FILE: b.kt
|
||||
package b
|
||||
|
||||
import a.A
|
||||
import a.<!OPERATOR_RENAMED_ON_IMPORT!>plus<!> as minus
|
||||
|
||||
fun test(a1: A, a2: A) =
|
||||
a1 - a2
|
||||
@@ -0,0 +1,15 @@
|
||||
package
|
||||
|
||||
package a {
|
||||
public operator fun a.A.plus(/*0*/ other: a.A): a.A
|
||||
|
||||
public interface A {
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
package b {
|
||||
public fun test(/*0*/ a1: a.A, /*1*/ a2: a.A): a.A
|
||||
}
|
||||
Reference in New Issue
Block a user