3b9724d20e
The expression needs to be resolved first to determine if there is a receiver that needs to be extracted to a temporary variable. Also, the special case for prefix increment/decrement on local variable without delegates requires resolution to check if the variable is local. ^KT-56771 Fixed ^KT-56659 Fixed
23 lines
404 B
Kotlin
Vendored
23 lines
404 B
Kotlin
Vendored
// SKIP_TXT
|
|
// ISSUE: KT-56659
|
|
|
|
object AAA { operator fun inc(): AAA = this }
|
|
|
|
fun test1() {
|
|
<!VAL_REASSIGNMENT!>AAA<!>++
|
|
}
|
|
|
|
fun test2() {
|
|
++<!VAL_REASSIGNMENT!>AAA<!>
|
|
}
|
|
|
|
fun test3() {
|
|
var <!ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE!>x<!> = AAA
|
|
x = <!VAL_REASSIGNMENT!>AAA<!>++
|
|
}
|
|
|
|
fun test4() {
|
|
var <!ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE!>x<!> = AAA
|
|
x = ++<!VAL_REASSIGNMENT!>AAA<!>
|
|
}
|