Extract Function: Fix type candidates for parameters with flexibly nullable types
#KT-6546 Fixed
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
||||
// WITH_RUNTIME
|
||||
// PARAM_TYPES: String?, String, kotlin.CharSequence?, CharSequence
|
||||
// PARAM_DESCRIPTOR: val property: (String..String?) defined in test
|
||||
fun test() {
|
||||
val property = System.getProperty("some")
|
||||
val n = <selection>property?.length()</selection>
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// WITH_RUNTIME
|
||||
// PARAM_TYPES: String?, String, kotlin.CharSequence?, CharSequence
|
||||
// PARAM_DESCRIPTOR: val property: (String..String?) defined in test
|
||||
fun test() {
|
||||
val property = System.getProperty("some")
|
||||
val n = i(property)
|
||||
}
|
||||
|
||||
private fun i(property: String?): Int? {
|
||||
return property?.length()
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// WITH_RUNTIME
|
||||
// PARAM_TYPES: String, CharSequence
|
||||
// PARAM_DESCRIPTOR: val property: (String..String?) defined in test
|
||||
fun test() {
|
||||
val property = System.getProperty("some")
|
||||
val n = <selection>property.length()</selection>
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// WITH_RUNTIME
|
||||
// PARAM_TYPES: String, CharSequence
|
||||
// PARAM_DESCRIPTOR: val property: (String..String?) defined in test
|
||||
fun test() {
|
||||
val property = System.getProperty("some")
|
||||
val n = i(property)
|
||||
}
|
||||
|
||||
private fun i(property: String): Int {
|
||||
return property.length()
|
||||
}
|
||||
Reference in New Issue
Block a user