Files
kotlin-fork/compiler/testData/ir/irText/expressions/augmentedAssignment1.kt.txt
T
Dmitriy Novozhilov b454fcc1e0 [FIR] Save IR dumps to .ir.txt files instead of .txt in tests
This is needed to avoid clashes between different dumps from different
  handlers
2021-10-12 17:26:36 +03:00

32 lines
550 B
Kotlin
Vendored

var p: Int
field = 0
get
set
fun testVariable() {
var x: Int = 0
x = x.plus(other = 1)
x = x.minus(other = 2)
x = x.times(other = 3)
x = x.div(other = 4)
x = x.rem(other = 5)
}
fun testProperty() {
{ // BLOCK
<set-p>(<set-?> = <get-p>().plus(other = 1))
}
{ // BLOCK
<set-p>(<set-?> = <get-p>().minus(other = 2))
}
{ // BLOCK
<set-p>(<set-?> = <get-p>().times(other = 3))
}
{ // BLOCK
<set-p>(<set-?> = <get-p>().div(other = 4))
}
{ // BLOCK
<set-p>(<set-?> = <get-p>().rem(other = 5))
}
}