FIR: Report UNSAFE_OPERATOR_CALL for augmented assignments (was

reporting UNSAFE_CALL).
This commit is contained in:
Mark Punzalan
2021-05-25 17:56:59 +00:00
committed by teamcityserver
parent ef923d4cfe
commit 32bb64a225
12 changed files with 93 additions and 12 deletions
@@ -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()
}