Analyze Data Flow: Support dereference processing

#KT-11994 In Progress
This commit is contained in:
Alexey Sedunov
2017-05-31 21:16:45 +03:00
parent 858b454138
commit 0f44dd6ab0
14 changed files with 260 additions and 15 deletions
@@ -0,0 +1,30 @@
// 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
}