Tweak checks and type parameter heuristics in LazyJavaClassDescriptor.getPurelyImplementedSupertype to support cases of UnaryOperator and BinaryOperator enhancements.

This commit is contained in:
Ilya Gorbunov
2016-12-07 18:48:45 +03:00
parent c3921d1e40
commit 459c5fed8c
4 changed files with 31 additions and 16 deletions
@@ -1,9 +1,7 @@
fun notNullValues(list: MutableList<String>) {
// TODO: Fix platform types
list.<caret>replaceAll { it.length.toString() }
}
fun nullableValues(list: MutableList<String?>) {
// TODO: Fix platform types
list.<caret>replaceAll { it?.run { length.toString() } }
}
@@ -1,15 +1,13 @@
fun notNullValues(list: MutableList<String>) {
// TODO: Fix platform types
list.replaceAll { it.length.toString() }
// SUCCESS
// ORIGINAL: fun replaceAll((E!) -> E!): Unit defined in kotlin.collections.MutableList
// SUBSTITUTED: fun replaceAll((String!) -> String!): Unit defined in kotlin.collections.MutableList
// ORIGINAL: fun replaceAll((E) -> E): Unit defined in kotlin.collections.MutableList
// SUBSTITUTED: fun replaceAll((String) -> String): Unit defined in kotlin.collections.MutableList
}
fun nullableValues(list: MutableList<String?>) {
// TODO: Fix platform types
list.replaceAll { it?.run { length.toString() } }
// SUCCESS
// ORIGINAL: fun replaceAll((E!) -> E!): Unit defined in kotlin.collections.MutableList
// ORIGINAL: fun replaceAll((E) -> E): Unit defined in kotlin.collections.MutableList
// SUBSTITUTED: fun replaceAll((String?) -> String?): Unit defined in kotlin.collections.MutableList
}