Files
kotlin-fork/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/augmentedAssignment.kt
T
2021-06-03 20:18:03 +03:00

18 lines
258 B
Kotlin
Vendored

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()
}