Extract Function: Fix type candidates for parameters with flexibly nullable types

#KT-6546 Fixed
This commit is contained in:
Alexey Sedunov
2014-12-26 14:54:28 +03:00
parent c8cb5f8c29
commit 64ddd52e60
6 changed files with 70 additions and 2 deletions
@@ -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>
}
@@ -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()
}
@@ -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>
}
@@ -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()
}