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

21 lines
348 B
Kotlin
Vendored

// FLOW: OUT
// WITH_DEREFERENCES
class A {
operator fun get(i: Int) = this
operator fun set(i: Int, a: A) = this
operator fun plusAssign(a: A) = this
operator fun times(a: A) = this
operator fun inc() = this
}
fun test() {
val <caret>x = A()
val y = A()
x[1]
x[1] = y
x[1] += y
x[1] *= y
x[1]++
}