Fix 'infix call' diagnostic for in operation
#KT-8845 Fixed
This commit is contained in:
+7
-7
@@ -1,7 +1,7 @@
|
||||
class A() {
|
||||
operator infix fun plus(<!UNUSED_PARAMETER!>i<!> : Int) {}
|
||||
operator fun unaryMinus() {}
|
||||
operator infix fun contains(<!UNUSED_PARAMETER!>a<!> : Any?) : Boolean = true
|
||||
operator infix fun plus(<!UNUSED_PARAMETER!>i<!> : Int) {}
|
||||
operator fun unaryMinus() {}
|
||||
operator infix fun contains(<!UNUSED_PARAMETER!>a<!> : Any?) : Boolean = true
|
||||
}
|
||||
|
||||
operator infix fun A.div(<!UNUSED_PARAMETER!>i<!> : Int) {}
|
||||
@@ -10,7 +10,7 @@ operator infix fun A?.times(<!UNUSED_PARAMETER!>i<!> : Int) {}
|
||||
fun test(x : Int?, a : A?) {
|
||||
x<!UNSAFE_CALL!>.<!>plus(1)
|
||||
x?.plus(1)
|
||||
x <!UNSAFE_INFIX_CALL!>+<!> 1
|
||||
x <!UNSAFE_OPERATOR_CALL!>+<!> 1
|
||||
<!UNSAFE_CALL!>-<!>x
|
||||
x<!UNSAFE_CALL!>.<!>unaryMinus()
|
||||
x?.unaryMinus()
|
||||
@@ -18,13 +18,13 @@ fun test(x : Int?, a : A?) {
|
||||
a<!UNSAFE_CALL!>.<!>plus(1)
|
||||
a?.plus(1)
|
||||
a <!UNSAFE_INFIX_CALL!>plus<!> 1
|
||||
a <!UNSAFE_INFIX_CALL!>+<!> 1
|
||||
a <!UNSAFE_OPERATOR_CALL!>+<!> 1
|
||||
<!UNSAFE_CALL!>-<!>a
|
||||
a<!UNSAFE_CALL!>.<!>unaryMinus()
|
||||
a?.unaryMinus()
|
||||
|
||||
a<!UNSAFE_CALL!>.<!>div(1)
|
||||
a <!UNSAFE_INFIX_CALL!>/<!> 1
|
||||
a <!UNSAFE_OPERATOR_CALL!>/<!> 1
|
||||
a <!UNSAFE_INFIX_CALL!>div<!> 1
|
||||
a?.div(1)
|
||||
|
||||
@@ -33,7 +33,7 @@ fun test(x : Int?, a : A?) {
|
||||
a times 1
|
||||
a?.times(1)
|
||||
|
||||
1 <!UNSAFE_INFIX_CALL!>in<!> a
|
||||
1 <!UNSAFE_OPERATOR_CALL!>in<!> a
|
||||
a <!UNSAFE_INFIX_CALL!>contains<!> 1
|
||||
a<!UNSAFE_CALL!>.<!>contains(1)
|
||||
a?.contains(1)
|
||||
|
||||
Reference in New Issue
Block a user