Fix KNPE in "introduce variable", add some name conflict introduce tests

So #KT-21530 Fixed
This commit is contained in:
Mikhail Glukhikh
2017-11-30 13:33:16 +03:00
parent 20b48ab90c
commit 7118a4bf80
10 changed files with 82 additions and 1 deletions
@@ -0,0 +1,6 @@
// EXTRACTION_TARGET: property with initializer
fun test() = "123"
val f = <selection>test()</selection> + "456"
val x = test()
@@ -0,0 +1,8 @@
// EXTRACTION_TARGET: property with initializer
fun test() = "123"
private val s = test()
val f = s + "456"
val x = s
@@ -0,0 +1,8 @@
fun test() = "123"
open class First(val s: String)
object Second : First(<selection>test()</selection> + "456")
fun foo(test: String) {
val x = test()
}
@@ -0,0 +1,11 @@
fun test() = "123"
open class First(val s: String)
val test1 = test()
object Second : First(test1 + "456")
fun foo(test: String) {
val x = test1
}
@@ -0,0 +1,4 @@
fun test() = "123"
val f = <selection>test()</selection> + "456"
val x = test()
@@ -0,0 +1,5 @@
fun test() = "123"
val test = test()
val f = test + "456"
val x = test
@@ -0,0 +1,7 @@
fun test() = "123"
val f = <selection>test()</selection> + "456"
fun foo(test: String) {
val x = test()
}
@@ -0,0 +1,8 @@
fun test() = "123"
val test1 = test()
val f = test1 + "456"
fun foo(test: String) {
val x = test1
}