Fix KNPE in "introduce variable", add some name conflict introduce tests
So #KT-21530 Fixed
This commit is contained in:
@@ -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()
|
||||
}
|
||||
+11
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user