Files
kotlin-fork/compiler/testData/diagnostics/tests/regressions/kt629.fir.kt
T
2021-04-19 15:09:50 +03:00

24 lines
398 B
Kotlin
Vendored

//KT-629 Assignments are parsed as expressions.
package kt629
class A() {
var p = "yeah"
operator fun rem(other : A) : A {
return A();
}
}
fun box() : Boolean {
var c = A()
val d = c;
c %= A();
return (c != d) && <!EXPRESSION_EXPECTED!>(c.p = "yeah")<!>
}
fun box2() : Boolean {
var c = A()
return <!EXPRESSION_EXPECTED!>(c.p = "yeah")<!> && true
}