Report warning on unary plus()/minus()
This commit is contained in:
+3
-3
@@ -1,6 +1,6 @@
|
||||
class A() {
|
||||
operator infix fun plus(<!UNUSED_PARAMETER!>i<!> : Int) {}
|
||||
operator fun minus() {}
|
||||
operator fun unaryMinus() {}
|
||||
operator infix fun contains(<!UNUSED_PARAMETER!>a<!> : Any?) : Boolean = true
|
||||
}
|
||||
|
||||
@@ -20,8 +20,8 @@ fun test(x : Int?, a : A?) {
|
||||
a <!UNSAFE_INFIX_CALL!>plus<!> 1
|
||||
a <!UNSAFE_INFIX_CALL!>+<!> 1
|
||||
<!UNSAFE_CALL!>-<!>a
|
||||
a<!UNSAFE_CALL!>.<!>minus()
|
||||
a?.minus()
|
||||
a<!UNSAFE_CALL!>.<!>unaryMinus()
|
||||
a?.unaryMinus()
|
||||
|
||||
a<!UNSAFE_CALL!>.<!>div(1)
|
||||
a <!UNSAFE_INFIX_CALL!>/<!> 1
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ public final class A {
|
||||
public final operator infix fun contains(/*0*/ a: kotlin.Any?): kotlin.Boolean
|
||||
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 final operator fun minus(): kotlin.Unit
|
||||
public final operator infix fun plus(/*0*/ i: kotlin.Int): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
public final operator fun unaryMinus(): kotlin.Unit
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user