Extraction Engine: Suggest both bounds for nullability-flexible types without nullability annotations. Do not omit return type if inferred one is flexible
#KT-6837 Fixed
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
// SUGGESTED_RETURN_TYPES: kotlin.Boolean?, kotlin.Boolean
|
||||
// PARAM_DESCRIPTOR: value-parameter val it: kotlin.Map.Entry<(Boolean..Boolean?), (Boolean..Boolean?)> defined in test.<anonymous>
|
||||
// PARAM_TYPES: kotlin.Map.Entry<(Boolean..Boolean?), (Boolean..Boolean?)>
|
||||
fun test() {
|
||||
|
||||
+2
-1
@@ -1,8 +1,9 @@
|
||||
// WITH_RUNTIME
|
||||
// SUGGESTED_RETURN_TYPES: kotlin.Boolean?, kotlin.Boolean
|
||||
// PARAM_DESCRIPTOR: value-parameter val it: kotlin.Map.Entry<(Boolean..Boolean?), (Boolean..Boolean?)> defined in test.<anonymous>
|
||||
// PARAM_TYPES: kotlin.Map.Entry<(Boolean..Boolean?), (Boolean..Boolean?)>
|
||||
fun test() {
|
||||
J.getMap().filter { b(it) }
|
||||
}
|
||||
|
||||
private fun b(it: Map.Entry<Boolean, Boolean>) = it.getKey()
|
||||
private fun b(it: Map.Entry<Boolean, Boolean>): Boolean? = it.getKey()
|
||||
Reference in New Issue
Block a user