Files
kotlin/compiler/testData/diagnostics/tests/operatorsOverloading/AssignOperatorAmbiguity.kt
2015-02-27 19:32:58 +03:00

18 lines
293 B
Kotlin

//KT-1820 Write test for ASSIGN_OPERATOR_AMBIGUITY
package kt1820
class MyInt(val i: Int) {
fun plus(m: MyInt) : MyInt = MyInt(m.i + i)
}
fun Any.plusAssign(<!UNUSED_PARAMETER!>a<!>: Any) {}
fun test(m: MyInt) {
m += m
var i = 1
i <!ASSIGN_OPERATOR_AMBIGUITY!>+=<!> 34
}