[NI-MIGRATE] Update test about signature enhancements
It's required as now there are no synthetic candidates
This commit is contained in:
+6
-6
@@ -1,20 +1,20 @@
|
||||
fun notNullValues(collection: MutableCollection<String>) {
|
||||
collection.removeIf { it.length > 5 }
|
||||
// SUCCESS
|
||||
// ORIGINAL: fun removeIf((E) -> Boolean): Boolean defined in kotlin.collections.MutableCollection
|
||||
// SUBSTITUTED: fun removeIf((String) -> Boolean): Boolean defined in kotlin.collections.MutableCollection
|
||||
// ORIGINAL: fun removeIf(Predicate<in E>): Boolean defined in kotlin.collections.MutableCollection
|
||||
// SUBSTITUTED: fun removeIf(Predicate<in String>): Boolean defined in kotlin.collections.MutableCollection
|
||||
}
|
||||
|
||||
fun <E : CharSequence> nullableValues(collection: MutableCollection<E?>) {
|
||||
collection.removeIf { it != null && it.length > 5 }
|
||||
// SUCCESS
|
||||
// ORIGINAL: fun removeIf((E) -> Boolean): Boolean defined in kotlin.collections.MutableCollection
|
||||
// SUBSTITUTED: fun removeIf((E?) -> Boolean): Boolean defined in kotlin.collections.MutableCollection
|
||||
// ORIGINAL: fun removeIf(Predicate<in E>): Boolean defined in kotlin.collections.MutableCollection
|
||||
// SUBSTITUTED: fun removeIf(Predicate<in E?>): Boolean defined in kotlin.collections.MutableCollection
|
||||
}
|
||||
|
||||
fun <E : CharSequence?> nullableValues2(collection: MutableCollection<E>) {
|
||||
collection.removeIf { it == null }
|
||||
// SUCCESS
|
||||
// ORIGINAL: fun removeIf((E) -> Boolean): Boolean defined in kotlin.collections.MutableCollection
|
||||
// SUBSTITUTED: fun removeIf((E) -> Boolean): Boolean defined in kotlin.collections.MutableCollection
|
||||
// ORIGINAL: fun removeIf(Predicate<in E>): Boolean defined in kotlin.collections.MutableCollection
|
||||
// SUBSTITUTED: fun removeIf(Predicate<in E>): Boolean defined in kotlin.collections.MutableCollection
|
||||
}
|
||||
|
||||
+4
-4
@@ -1,13 +1,13 @@
|
||||
fun notNullValues(it: Iterator<String>) {
|
||||
it.forEachRemaining { e -> }
|
||||
// SUCCESS
|
||||
// ORIGINAL: fun forEachRemaining((T) -> Unit): Unit defined in kotlin.collections.Iterator
|
||||
// SUBSTITUTED: fun forEachRemaining((String) -> Unit): Unit defined in kotlin.collections.Iterator
|
||||
// ORIGINAL: fun forEachRemaining(Consumer<in T>): Unit defined in kotlin.collections.Iterator
|
||||
// SUBSTITUTED: fun forEachRemaining(Consumer<in String>): Unit defined in kotlin.collections.Iterator
|
||||
}
|
||||
|
||||
fun mutableNullableValues(it: MutableIterator<String?>) {
|
||||
it.forEachRemaining { e -> }
|
||||
// SUCCESS
|
||||
// ORIGINAL: fun forEachRemaining((T) -> Unit): Unit defined in kotlin.collections.MutableIterator
|
||||
// SUBSTITUTED: fun forEachRemaining((String?) -> Unit): Unit defined in kotlin.collections.MutableIterator
|
||||
// ORIGINAL: fun forEachRemaining(Consumer<in T>): Unit defined in kotlin.collections.MutableIterator
|
||||
// SUBSTITUTED: fun forEachRemaining(Consumer<in String?>): Unit defined in kotlin.collections.MutableIterator
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
fun notNullValues(list: MutableList<String>) {
|
||||
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(UnaryOperator<E>): Unit defined in kotlin.collections.MutableList
|
||||
// SUBSTITUTED: fun replaceAll(UnaryOperator<String>): Unit defined in kotlin.collections.MutableList
|
||||
}
|
||||
|
||||
fun nullableValues(list: MutableList<String?>) {
|
||||
list.replaceAll { it?.run { 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(UnaryOperator<E>): Unit defined in kotlin.collections.MutableList
|
||||
// SUBSTITUTED: fun replaceAll(UnaryOperator<String?>): Unit defined in kotlin.collections.MutableList
|
||||
}
|
||||
|
||||
@@ -1,34 +1,34 @@
|
||||
fun valuesNotNull(map: MutableMap<Int, String>) {
|
||||
map.compute(1) { k, v -> null }
|
||||
// SUCCESS
|
||||
// ORIGINAL: fun compute(K, (K, V?) -> V?): V? defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun compute(Int, (Int, String?) -> String?): String? defined in kotlin.collections.MutableMap
|
||||
// ORIGINAL: fun compute(K, BiFunction<in K, in V?, out V?>): V? defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun compute(Int, BiFunction<in Int, in String?, out String?>): String? defined in kotlin.collections.MutableMap
|
||||
}
|
||||
|
||||
fun valuesNullable(map: MutableMap<Int, String?>) {
|
||||
map.compute(1) { k, v -> v?.let { it + k } }
|
||||
// SUCCESS
|
||||
// ORIGINAL: fun compute(K, (K, V?) -> V?): V? defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun compute(Int, (Int, String?) -> String?): String? defined in kotlin.collections.MutableMap
|
||||
// ORIGINAL: fun compute(K, BiFunction<in K, in V?, out V?>): V? defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun compute(Int, BiFunction<in Int, in String?, out String?>): String? defined in kotlin.collections.MutableMap
|
||||
}
|
||||
|
||||
fun <T> valuesT(map: MutableMap<Int, T>, newValue: T) {
|
||||
map.compute(1) { k, v -> null }
|
||||
// SUCCESS
|
||||
// ORIGINAL: fun compute(K, (K, V?) -> V?): V? defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun compute(Int, (Int, T?) -> T?): T? defined in kotlin.collections.MutableMap
|
||||
// ORIGINAL: fun compute(K, BiFunction<in K, in V?, out V?>): V? defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun compute(Int, BiFunction<in Int, in T?, out T?>): T? defined in kotlin.collections.MutableMap
|
||||
}
|
||||
|
||||
fun <T : Any> valuesTNotNull(map: MutableMap<Int, T>, newValue: T) {
|
||||
map.compute(1) { k, v -> null }
|
||||
// SUCCESS
|
||||
// ORIGINAL: fun compute(K, (K, V?) -> V?): V? defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun compute(Int, (Int, T?) -> T?): T? defined in kotlin.collections.MutableMap
|
||||
// ORIGINAL: fun compute(K, BiFunction<in K, in V?, out V?>): V? defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun compute(Int, BiFunction<in Int, in T?, out T?>): T? defined in kotlin.collections.MutableMap
|
||||
}
|
||||
|
||||
fun <T : Any> valuesTNullable(map: MutableMap<Int, T?>, newValue: T?) {
|
||||
map.compute(1) { k, v -> null }
|
||||
// SUCCESS
|
||||
// ORIGINAL: fun compute(K, (K, V?) -> V?): V? defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun compute(Int, (Int, T?) -> T?): T? defined in kotlin.collections.MutableMap
|
||||
// ORIGINAL: fun compute(K, BiFunction<in K, in V?, out V?>): V? defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun compute(Int, BiFunction<in Int, in T?, out T?>): T? defined in kotlin.collections.MutableMap
|
||||
}
|
||||
|
||||
+10
-10
@@ -1,34 +1,34 @@
|
||||
fun valuesNotNull(map: MutableMap<Int, String>) {
|
||||
map.computeIfAbsent(1) { k -> "new value" }
|
||||
// SUCCESS
|
||||
// ORIGINAL: fun computeIfAbsent(K, (K) -> V): V defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun computeIfAbsent(Int, (Int) -> String): String defined in kotlin.collections.MutableMap
|
||||
// ORIGINAL: fun computeIfAbsent(K, Function<in K, out V>): V defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun computeIfAbsent(Int, Function<in Int, out String>): String defined in kotlin.collections.MutableMap
|
||||
}
|
||||
|
||||
fun valuesNullable(map: MutableMap<Int, String?>) {
|
||||
map.computeIfAbsent(1) { k -> null }
|
||||
// SUCCESS
|
||||
// ORIGINAL: fun computeIfAbsent(K, (K) -> V): V defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun computeIfAbsent(Int, (Int) -> String?): String? defined in kotlin.collections.MutableMap
|
||||
// ORIGINAL: fun computeIfAbsent(K, Function<in K, out V>): V defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun computeIfAbsent(Int, Function<in Int, out String?>): String? defined in kotlin.collections.MutableMap
|
||||
}
|
||||
|
||||
fun <T> valuesT(map: MutableMap<Int, T>, newValue: T) {
|
||||
map.computeIfAbsent(1) { k -> newValue }
|
||||
// SUCCESS
|
||||
// ORIGINAL: fun computeIfAbsent(K, (K) -> V): V defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun computeIfAbsent(Int, (Int) -> T): T defined in kotlin.collections.MutableMap
|
||||
// ORIGINAL: fun computeIfAbsent(K, Function<in K, out V>): V defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun computeIfAbsent(Int, Function<in Int, out T>): T defined in kotlin.collections.MutableMap
|
||||
}
|
||||
|
||||
fun <T : Any> valuesTNotNull(map: MutableMap<Int, T>, newValue: T) {
|
||||
map.computeIfAbsent(1) { k -> newValue }
|
||||
// SUCCESS
|
||||
// ORIGINAL: fun computeIfAbsent(K, (K) -> V): V defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun computeIfAbsent(Int, (Int) -> T): T defined in kotlin.collections.MutableMap
|
||||
// ORIGINAL: fun computeIfAbsent(K, Function<in K, out V>): V defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun computeIfAbsent(Int, Function<in Int, out T>): T defined in kotlin.collections.MutableMap
|
||||
}
|
||||
|
||||
fun <T : Any> valuesTNullable(map: MutableMap<Int, T?>, newValue: T?) {
|
||||
map.computeIfAbsent(1) { k -> newValue }
|
||||
// SUCCESS
|
||||
// ORIGINAL: fun computeIfAbsent(K, (K) -> V): V defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun computeIfAbsent(Int, (Int) -> T?): T? defined in kotlin.collections.MutableMap
|
||||
// ORIGINAL: fun computeIfAbsent(K, Function<in K, out V>): V defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun computeIfAbsent(Int, Function<in Int, out T?>): T? defined in kotlin.collections.MutableMap
|
||||
}
|
||||
|
||||
+10
-10
@@ -1,34 +1,34 @@
|
||||
fun valuesNotNull(map: MutableMap<Int, String>) {
|
||||
map.computeIfPresent(1) { k, v -> v.length.toString() ?: null }
|
||||
// SUCCESS
|
||||
// ORIGINAL: fun computeIfPresent(K, (K, V) -> V?): V? defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun computeIfPresent(Int, (Int, String) -> String?): String? defined in kotlin.collections.MutableMap
|
||||
// ORIGINAL: fun computeIfPresent(K, BiFunction<in K, in V, out V?>): V? defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun computeIfPresent(Int, BiFunction<in Int, in String, out String?>): String? defined in kotlin.collections.MutableMap
|
||||
}
|
||||
|
||||
fun valuesNullable(map: MutableMap<Int, String?>) {
|
||||
map.computeIfPresent(1) { k, v -> v?.length?.toString() }
|
||||
// SUCCESS
|
||||
// ORIGINAL: fun computeIfPresent(K, (K, V) -> V?): V? defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun computeIfPresent(Int, (Int, String) -> String?): String? defined in kotlin.collections.MutableMap
|
||||
// ORIGINAL: fun computeIfPresent(K, BiFunction<in K, in V, out V?>): V? defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun computeIfPresent(Int, BiFunction<in Int, in String, out String?>): String? defined in kotlin.collections.MutableMap
|
||||
}
|
||||
|
||||
fun <T : String?> valuesT(map: MutableMap<Int, T>, newValue: T) {
|
||||
map.computeIfPresent(1) { k, v -> v?.length.toString() ?: null }
|
||||
// SUCCESS
|
||||
// ORIGINAL: fun computeIfPresent(K, (K, V) -> V?): V? defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun computeIfPresent(Int, (Int, T) -> T?): T? defined in kotlin.collections.MutableMap
|
||||
// ORIGINAL: fun computeIfPresent(K, BiFunction<in K, in V, out V?>): V? defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun computeIfPresent(Int, BiFunction<in Int, in T, out T?>): T? defined in kotlin.collections.MutableMap
|
||||
}
|
||||
|
||||
fun <T : Any> valuesTNotNull(map: MutableMap<Int, T>, newValue: T) {
|
||||
map.computeIfPresent(1) { k, v -> null }
|
||||
// SUCCESS
|
||||
// ORIGINAL: fun computeIfPresent(K, (K, V) -> V?): V? defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun computeIfPresent(Int, (Int, T) -> T?): T? defined in kotlin.collections.MutableMap
|
||||
// ORIGINAL: fun computeIfPresent(K, BiFunction<in K, in V, out V?>): V? defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun computeIfPresent(Int, BiFunction<in Int, in T, out T?>): T? defined in kotlin.collections.MutableMap
|
||||
}
|
||||
|
||||
fun <T : Any> valuesTNullable(map: MutableMap<Int, T?>, newValue: T?) {
|
||||
map.computeIfPresent(1) { k, v -> null }
|
||||
// SUCCESS
|
||||
// ORIGINAL: fun computeIfPresent(K, (K, V) -> V?): V? defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun computeIfPresent(Int, (Int, T) -> T?): T? defined in kotlin.collections.MutableMap
|
||||
// ORIGINAL: fun computeIfPresent(K, BiFunction<in K, in V, out V?>): V? defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun computeIfPresent(Int, BiFunction<in Int, in T, out T?>): T? defined in kotlin.collections.MutableMap
|
||||
}
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
fun valuesNotNull(map: MutableMap<Int, String>) {
|
||||
map.forEach { k, v -> }
|
||||
// SUCCESS
|
||||
// ORIGINAL: fun forEach((K, V) -> Unit): Unit defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun forEach((Int, String) -> Unit): Unit defined in kotlin.collections.MutableMap
|
||||
// ORIGINAL: fun forEach(BiConsumer<in K, in V>): Unit defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun forEach(BiConsumer<in Int, in String>): Unit defined in kotlin.collections.MutableMap
|
||||
}
|
||||
|
||||
fun <T> valuesT(map: MutableMap<Int, T>, newValue: T) {
|
||||
map.forEach { k, v -> }
|
||||
// SUCCESS
|
||||
// ORIGINAL: fun forEach((K, V) -> Unit): Unit defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun forEach((Int, T) -> Unit): Unit defined in kotlin.collections.MutableMap
|
||||
// ORIGINAL: fun forEach(BiConsumer<in K, in V>): Unit defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun forEach(BiConsumer<in Int, in T>): Unit defined in kotlin.collections.MutableMap
|
||||
}
|
||||
|
||||
|
||||
@@ -1,42 +1,42 @@
|
||||
fun valuesNotNull(map: MutableMap<Int, String>) {
|
||||
map.merge(1, "x") { old, new -> old + new }
|
||||
// SUCCESS
|
||||
// ORIGINAL: fun merge(K, V, (V, V) -> V?): V? defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun merge(Int, String, (String, String) -> String?): String? defined in kotlin.collections.MutableMap
|
||||
// ORIGINAL: fun merge(K, V, BiFunction<in V, in V, out V?>): V? defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun merge(Int, String, BiFunction<in String, in String, out String?>): String? defined in kotlin.collections.MutableMap
|
||||
}
|
||||
|
||||
fun valuesNullable(map: MutableMap<Int, String?>) {
|
||||
map.merge(1, "x") { old, new -> old + new }
|
||||
// SUCCESS
|
||||
// ORIGINAL: fun merge(K, V, (V, V) -> V?): V? defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun merge(Int, String, (String, String) -> String?): String? defined in kotlin.collections.MutableMap
|
||||
// ORIGINAL: fun merge(K, V, BiFunction<in V, in V, out V?>): V? defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun merge(Int, String, BiFunction<in String, in String, out String?>): String? defined in kotlin.collections.MutableMap
|
||||
map.merge(1, null) { old, new -> old + new }
|
||||
// NULLABLE_ARGUMENT_TYPE_MISMATCH
|
||||
// ORIGINAL: fun merge(K, V, (V, V) -> V?): V? defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun merge(Int, String, (String, String) -> String?): String? defined in kotlin.collections.MutableMap
|
||||
// OTHER_ERROR
|
||||
// ORIGINAL: fun merge(K, V, BiFunction<in V, in V, out V?>): V? defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun merge(Int, String, BiFunction<in String, in String, out String?>): String? defined in kotlin.collections.MutableMap
|
||||
}
|
||||
|
||||
fun <T> valuesT(map: MutableMap<Int, T>, newValue: T) {
|
||||
map.merge(1, newValue) { old, new -> null }
|
||||
// SUCCESS
|
||||
// ORIGINAL: fun merge(K, V, (V, V) -> V?): V? defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun merge(Int, T, (T, T) -> T?): T? defined in kotlin.collections.MutableMap
|
||||
// ORIGINAL: fun merge(K, V, BiFunction<in V, in V, out V?>): V? defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun merge(Int, T, BiFunction<in T, in T, out T?>): T? defined in kotlin.collections.MutableMap
|
||||
}
|
||||
|
||||
fun <T : Any> valuesTNotNull(map: MutableMap<Int, T>, newValue: T) {
|
||||
map.merge(1, newValue) { old, new -> null }
|
||||
// SUCCESS
|
||||
// ORIGINAL: fun merge(K, V, (V, V) -> V?): V? defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun merge(Int, T, (T, T) -> T?): T? defined in kotlin.collections.MutableMap
|
||||
// ORIGINAL: fun merge(K, V, BiFunction<in V, in V, out V?>): V? defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun merge(Int, T, BiFunction<in T, in T, out T?>): T? defined in kotlin.collections.MutableMap
|
||||
}
|
||||
|
||||
fun <T : Any> valuesTNullable(map: MutableMap<Int, T?>, newValue: T?) {
|
||||
map.merge(1, newValue) { old, new -> new }
|
||||
// NULLABLE_ARGUMENT_TYPE_MISMATCH
|
||||
// ORIGINAL: fun merge(K, V, (V, V) -> V?): V? defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun merge(Int, T, (T, T) -> T?): T? defined in kotlin.collections.MutableMap
|
||||
// OTHER_ERROR
|
||||
// ORIGINAL: fun merge(K, V, BiFunction<in V, in V, out V?>): V? defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun merge(Int, T, BiFunction<in T, in T, out T?>): T? defined in kotlin.collections.MutableMap
|
||||
map.merge(1, newValue!!) { old, new -> new }
|
||||
// SUCCESS
|
||||
// ORIGINAL: fun merge(K, V, (V, V) -> V?): V? defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun merge(Int, T, (T, T) -> T?): T? defined in kotlin.collections.MutableMap
|
||||
// ORIGINAL: fun merge(K, V, BiFunction<in V, in V, out V?>): V? defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun merge(Int, T, BiFunction<in T, in T, out T?>): T? defined in kotlin.collections.MutableMap
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@ fun valuesNotNull(map: MutableMap<Int, String>) {
|
||||
|
||||
map.replaceAll { k, v -> "$k to ${v.length}" }
|
||||
// SUCCESS
|
||||
// ORIGINAL: fun replaceAll((K, V) -> V): Unit defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun replaceAll((Int, String) -> String): Unit defined in kotlin.collections.MutableMap
|
||||
// ORIGINAL: fun replaceAll(BiFunction<in K, in V, out V>): Unit defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun replaceAll(BiFunction<in Int, in String, out String>): Unit defined in kotlin.collections.MutableMap
|
||||
}
|
||||
|
||||
fun valuesNullable(map: MutableMap<Int, String?>) {
|
||||
@@ -26,7 +26,7 @@ fun valuesNullable(map: MutableMap<Int, String?>) {
|
||||
|
||||
map.replaceAll { k, v -> "$k to $v" }
|
||||
// SUCCESS
|
||||
// ORIGINAL: fun replaceAll((K, V) -> V): Unit defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun replaceAll((Int, String?) -> String?): Unit defined in kotlin.collections.MutableMap
|
||||
// ORIGINAL: fun replaceAll(BiFunction<in K, in V, out V>): Unit defined in kotlin.collections.MutableMap
|
||||
// SUBSTITUTED: fun replaceAll(BiFunction<in Int, in String?, out String?>): Unit defined in kotlin.collections.MutableMap
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -3,14 +3,14 @@ import java.util.*
|
||||
fun use(v: Optional<String>) {
|
||||
v.ifPresent { value -> }
|
||||
// SUCCESS
|
||||
// ORIGINAL: fun ifPresent((T) -> Unit): Unit defined in java.util.Optional
|
||||
// SUBSTITUTED: fun ifPresent((String) -> Unit): Unit defined in java.util.Optional
|
||||
// ORIGINAL: fun ifPresent(Consumer<in T>): Unit defined in java.util.Optional
|
||||
// SUBSTITUTED: fun ifPresent(Consumer<in String>): Unit defined in java.util.Optional
|
||||
}
|
||||
|
||||
fun use2(v: Optional<String?>) {
|
||||
v.ifPresent { value -> }
|
||||
// SUCCESS
|
||||
// ORIGINAL: fun ifPresent((T) -> Unit): Unit defined in java.util.Optional
|
||||
// SUBSTITUTED: fun ifPresent((String) -> Unit): Unit defined in java.util.Optional
|
||||
// ORIGINAL: fun ifPresent(Consumer<in T>): Unit defined in java.util.Optional
|
||||
// SUBSTITUTED: fun ifPresent(Consumer<in String>): Unit defined in java.util.Optional
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user