Join with assignment: fix false negative when local variable are used

#KT-34270 Fixed
This commit is contained in:
Toshiaki Kameyama
2019-12-02 14:49:06 +09:00
committed by Yan Zhulanow
parent b56272dc64
commit 5a3c6def8f
6 changed files with 47 additions and 4 deletions
@@ -0,0 +1,8 @@
class Test(height: Int, width: Int) {
private val size: Int = height * width
private val <caret>data: Int
init {
data = size
}
}
@@ -0,0 +1,5 @@
class Test(height: Int, width: Int) {
private val size: Int = height * width
private val data: Int = size
}
@@ -0,0 +1,10 @@
class Foo(size: Int)
class Test(height: Int, width: Int) {
private val size: Int = height * width
private val <caret>data: Foo
init {
data = Foo(size)
}
}
@@ -0,0 +1,7 @@
class Foo(size: Int)
class Test(height: Int, width: Int) {
private val size: Int = height * width
private val data: Foo = Foo(size)
}