Files
kotlin-fork/compiler/testData/diagnostics/tests/operatorsOverloading/plusAssignOnProperty.kt
T
2022-03-11 15:36:05 +03:00

20 lines
303 B
Kotlin
Vendored

// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_PARAMETER
class C {
val c: C = C()
}
operator fun C.plus(a: Any): C = this
operator fun C.plusAssign(a: Any) {}
class C1 {
var c: C = C()
}
fun test() {
val c = C()
c.c += ""
var c1 = C1()
c1.c <!ASSIGN_OPERATOR_AMBIGUITY!>+=<!> ""
}