FIR: Report UNSAFE_OPERATOR_CALL for augmented assignments (was
reporting UNSAFE_CALL).
This commit is contained in:
committed by
teamcityserver
parent
ef923d4cfe
commit
32bb64a225
+17
@@ -0,0 +1,17 @@
|
||||
class A {
|
||||
operator fun plusAssign(s: String) {}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
var a: A? = A()
|
||||
a <!UNSAFE_OPERATOR_CALL!>+=<!> ""
|
||||
}
|
||||
|
||||
class B {
|
||||
operator fun plus(other: B) = this
|
||||
}
|
||||
|
||||
fun test2() {
|
||||
var b: B? = B()
|
||||
b <!UNSAFE_OPERATOR_CALL!>+=<!> B()
|
||||
}
|
||||
Reference in New Issue
Block a user