Files
kotlin-fork/idea/testData/slicer/outflow/operatorCallDereferences.kt
T
Alexey Sedunov 0f44dd6ab0 Analyze Data Flow: Support dereference processing
#KT-11994 In Progress
2017-06-09 17:19:16 +03:00

30 lines
468 B
Kotlin
Vendored

// FLOW: OUT
// WITH_DEREFERENCES
class A {
operator fun plus(n: Int) = this
operator fun unaryPlus() = this
operator fun inc() = this
operator fun timesAssign(n: Int) = this
}
operator fun A.minus(n: Int) = this
operator fun A.unaryMinus() = this
operator fun A.dec() = this
operator fun A.divAssign(n: Int) = this
fun test() {
var <caret>x = A()
+x
x + 1
x++
x += 1
x *= 1
-x
x - 1
x--
x -= 1
x /= 1
}