From c2fc633ad6e17e3a27d550c68432e7de7dd2d082 Mon Sep 17 00:00:00 2001 From: Mikhail Zarechenskiy Date: Wed, 12 Feb 2020 18:53:04 +0300 Subject: [PATCH] [NI-MIGRATE] Update test about signature enhancements It's required as now there are no synthetic candidates --- .../collection/collectionRemoveIf.txt | 12 +++---- .../iterator/iteratorForEachRemaining.txt | 8 ++--- .../list/listReplaceAll.txt | 8 ++--- .../enhancedSignatures/map/mapCompute.txt | 20 ++++++------ .../map/mapComputeIfAbsent.txt | 20 ++++++------ .../map/mapComputeIfPresent.txt | 20 ++++++------ .../enhancedSignatures/map/mapForEach.txt | 9 +++--- .../enhancedSignatures/map/mapMerge.txt | 32 +++++++++---------- .../enhancedSignatures/map/mapReplace.txt | 8 ++--- .../optional/optionalIfPresent.txt | 8 ++--- 10 files changed, 73 insertions(+), 72 deletions(-) diff --git a/compiler/testData/resolvedCalls/enhancedSignatures/collection/collectionRemoveIf.txt b/compiler/testData/resolvedCalls/enhancedSignatures/collection/collectionRemoveIf.txt index a9472fce8c7..aa880833ab6 100644 --- a/compiler/testData/resolvedCalls/enhancedSignatures/collection/collectionRemoveIf.txt +++ b/compiler/testData/resolvedCalls/enhancedSignatures/collection/collectionRemoveIf.txt @@ -1,20 +1,20 @@ fun notNullValues(collection: MutableCollection) { 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): Boolean defined in kotlin.collections.MutableCollection + // SUBSTITUTED: fun removeIf(Predicate): Boolean defined in kotlin.collections.MutableCollection } fun nullableValues(collection: MutableCollection) { 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): Boolean defined in kotlin.collections.MutableCollection + // SUBSTITUTED: fun removeIf(Predicate): Boolean defined in kotlin.collections.MutableCollection } fun nullableValues2(collection: MutableCollection) { 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): Boolean defined in kotlin.collections.MutableCollection + // SUBSTITUTED: fun removeIf(Predicate): Boolean defined in kotlin.collections.MutableCollection } diff --git a/compiler/testData/resolvedCalls/enhancedSignatures/iterator/iteratorForEachRemaining.txt b/compiler/testData/resolvedCalls/enhancedSignatures/iterator/iteratorForEachRemaining.txt index 227328b4923..4dd7c58ea46 100644 --- a/compiler/testData/resolvedCalls/enhancedSignatures/iterator/iteratorForEachRemaining.txt +++ b/compiler/testData/resolvedCalls/enhancedSignatures/iterator/iteratorForEachRemaining.txt @@ -1,13 +1,13 @@ fun notNullValues(it: Iterator) { 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): Unit defined in kotlin.collections.Iterator + // SUBSTITUTED: fun forEachRemaining(Consumer): Unit defined in kotlin.collections.Iterator } fun mutableNullableValues(it: MutableIterator) { 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): Unit defined in kotlin.collections.MutableIterator + // SUBSTITUTED: fun forEachRemaining(Consumer): Unit defined in kotlin.collections.MutableIterator } diff --git a/compiler/testData/resolvedCalls/enhancedSignatures/list/listReplaceAll.txt b/compiler/testData/resolvedCalls/enhancedSignatures/list/listReplaceAll.txt index 99267d747dc..794386c0255 100644 --- a/compiler/testData/resolvedCalls/enhancedSignatures/list/listReplaceAll.txt +++ b/compiler/testData/resolvedCalls/enhancedSignatures/list/listReplaceAll.txt @@ -1,13 +1,13 @@ fun notNullValues(list: MutableList) { 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): Unit defined in kotlin.collections.MutableList + // SUBSTITUTED: fun replaceAll(UnaryOperator): Unit defined in kotlin.collections.MutableList } fun nullableValues(list: MutableList) { 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): Unit defined in kotlin.collections.MutableList + // SUBSTITUTED: fun replaceAll(UnaryOperator): Unit defined in kotlin.collections.MutableList } diff --git a/compiler/testData/resolvedCalls/enhancedSignatures/map/mapCompute.txt b/compiler/testData/resolvedCalls/enhancedSignatures/map/mapCompute.txt index 36d2a9755ca..4148deb45e6 100644 --- a/compiler/testData/resolvedCalls/enhancedSignatures/map/mapCompute.txt +++ b/compiler/testData/resolvedCalls/enhancedSignatures/map/mapCompute.txt @@ -1,34 +1,34 @@ fun valuesNotNull(map: MutableMap) { 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): V? defined in kotlin.collections.MutableMap + // SUBSTITUTED: fun compute(Int, BiFunction): String? defined in kotlin.collections.MutableMap } fun valuesNullable(map: MutableMap) { 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): V? defined in kotlin.collections.MutableMap + // SUBSTITUTED: fun compute(Int, BiFunction): String? defined in kotlin.collections.MutableMap } fun valuesT(map: MutableMap, 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): V? defined in kotlin.collections.MutableMap + // SUBSTITUTED: fun compute(Int, BiFunction): T? defined in kotlin.collections.MutableMap } fun valuesTNotNull(map: MutableMap, 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): V? defined in kotlin.collections.MutableMap + // SUBSTITUTED: fun compute(Int, BiFunction): T? defined in kotlin.collections.MutableMap } fun valuesTNullable(map: MutableMap, 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): V? defined in kotlin.collections.MutableMap + // SUBSTITUTED: fun compute(Int, BiFunction): T? defined in kotlin.collections.MutableMap } diff --git a/compiler/testData/resolvedCalls/enhancedSignatures/map/mapComputeIfAbsent.txt b/compiler/testData/resolvedCalls/enhancedSignatures/map/mapComputeIfAbsent.txt index d49287d3bb4..d90dc6ce530 100644 --- a/compiler/testData/resolvedCalls/enhancedSignatures/map/mapComputeIfAbsent.txt +++ b/compiler/testData/resolvedCalls/enhancedSignatures/map/mapComputeIfAbsent.txt @@ -1,34 +1,34 @@ fun valuesNotNull(map: MutableMap) { 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): V defined in kotlin.collections.MutableMap + // SUBSTITUTED: fun computeIfAbsent(Int, Function): String defined in kotlin.collections.MutableMap } fun valuesNullable(map: MutableMap) { 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): V defined in kotlin.collections.MutableMap + // SUBSTITUTED: fun computeIfAbsent(Int, Function): String? defined in kotlin.collections.MutableMap } fun valuesT(map: MutableMap, 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): V defined in kotlin.collections.MutableMap + // SUBSTITUTED: fun computeIfAbsent(Int, Function): T defined in kotlin.collections.MutableMap } fun valuesTNotNull(map: MutableMap, 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): V defined in kotlin.collections.MutableMap + // SUBSTITUTED: fun computeIfAbsent(Int, Function): T defined in kotlin.collections.MutableMap } fun valuesTNullable(map: MutableMap, 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): V defined in kotlin.collections.MutableMap + // SUBSTITUTED: fun computeIfAbsent(Int, Function): T? defined in kotlin.collections.MutableMap } diff --git a/compiler/testData/resolvedCalls/enhancedSignatures/map/mapComputeIfPresent.txt b/compiler/testData/resolvedCalls/enhancedSignatures/map/mapComputeIfPresent.txt index 2a5914be571..559df722a1e 100644 --- a/compiler/testData/resolvedCalls/enhancedSignatures/map/mapComputeIfPresent.txt +++ b/compiler/testData/resolvedCalls/enhancedSignatures/map/mapComputeIfPresent.txt @@ -1,34 +1,34 @@ fun valuesNotNull(map: MutableMap) { 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): V? defined in kotlin.collections.MutableMap + // SUBSTITUTED: fun computeIfPresent(Int, BiFunction): String? defined in kotlin.collections.MutableMap } fun valuesNullable(map: MutableMap) { 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): V? defined in kotlin.collections.MutableMap + // SUBSTITUTED: fun computeIfPresent(Int, BiFunction): String? defined in kotlin.collections.MutableMap } fun valuesT(map: MutableMap, 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): V? defined in kotlin.collections.MutableMap + // SUBSTITUTED: fun computeIfPresent(Int, BiFunction): T? defined in kotlin.collections.MutableMap } fun valuesTNotNull(map: MutableMap, 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): V? defined in kotlin.collections.MutableMap + // SUBSTITUTED: fun computeIfPresent(Int, BiFunction): T? defined in kotlin.collections.MutableMap } fun valuesTNullable(map: MutableMap, 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): V? defined in kotlin.collections.MutableMap + // SUBSTITUTED: fun computeIfPresent(Int, BiFunction): T? defined in kotlin.collections.MutableMap } diff --git a/compiler/testData/resolvedCalls/enhancedSignatures/map/mapForEach.txt b/compiler/testData/resolvedCalls/enhancedSignatures/map/mapForEach.txt index 0430d504ce9..c8eb06bce1a 100644 --- a/compiler/testData/resolvedCalls/enhancedSignatures/map/mapForEach.txt +++ b/compiler/testData/resolvedCalls/enhancedSignatures/map/mapForEach.txt @@ -1,13 +1,14 @@ fun valuesNotNull(map: MutableMap) { 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): Unit defined in kotlin.collections.MutableMap + // SUBSTITUTED: fun forEach(BiConsumer): Unit defined in kotlin.collections.MutableMap } fun valuesT(map: MutableMap, 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): Unit defined in kotlin.collections.MutableMap + // SUBSTITUTED: fun forEach(BiConsumer): Unit defined in kotlin.collections.MutableMap } + diff --git a/compiler/testData/resolvedCalls/enhancedSignatures/map/mapMerge.txt b/compiler/testData/resolvedCalls/enhancedSignatures/map/mapMerge.txt index 719573e25f8..3e3b57214ae 100644 --- a/compiler/testData/resolvedCalls/enhancedSignatures/map/mapMerge.txt +++ b/compiler/testData/resolvedCalls/enhancedSignatures/map/mapMerge.txt @@ -1,42 +1,42 @@ fun valuesNotNull(map: MutableMap) { 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): V? defined in kotlin.collections.MutableMap + // SUBSTITUTED: fun merge(Int, String, BiFunction): String? defined in kotlin.collections.MutableMap } fun valuesNullable(map: MutableMap) { 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): V? defined in kotlin.collections.MutableMap + // SUBSTITUTED: fun merge(Int, String, BiFunction): 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): V? defined in kotlin.collections.MutableMap + // SUBSTITUTED: fun merge(Int, String, BiFunction): String? defined in kotlin.collections.MutableMap } fun valuesT(map: MutableMap, 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): V? defined in kotlin.collections.MutableMap + // SUBSTITUTED: fun merge(Int, T, BiFunction): T? defined in kotlin.collections.MutableMap } fun valuesTNotNull(map: MutableMap, 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): V? defined in kotlin.collections.MutableMap + // SUBSTITUTED: fun merge(Int, T, BiFunction): T? defined in kotlin.collections.MutableMap } fun valuesTNullable(map: MutableMap, 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): V? defined in kotlin.collections.MutableMap + // SUBSTITUTED: fun merge(Int, T, BiFunction): 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): V? defined in kotlin.collections.MutableMap + // SUBSTITUTED: fun merge(Int, T, BiFunction): T? defined in kotlin.collections.MutableMap } diff --git a/compiler/testData/resolvedCalls/enhancedSignatures/map/mapReplace.txt b/compiler/testData/resolvedCalls/enhancedSignatures/map/mapReplace.txt index 0b2614a07e9..ef8e89d9dbe 100644 --- a/compiler/testData/resolvedCalls/enhancedSignatures/map/mapReplace.txt +++ b/compiler/testData/resolvedCalls/enhancedSignatures/map/mapReplace.txt @@ -10,8 +10,8 @@ fun valuesNotNull(map: MutableMap) { 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): Unit defined in kotlin.collections.MutableMap + // SUBSTITUTED: fun replaceAll(BiFunction): Unit defined in kotlin.collections.MutableMap } fun valuesNullable(map: MutableMap) { @@ -26,7 +26,7 @@ fun valuesNullable(map: MutableMap) { 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): Unit defined in kotlin.collections.MutableMap + // SUBSTITUTED: fun replaceAll(BiFunction): Unit defined in kotlin.collections.MutableMap } diff --git a/compiler/testData/resolvedCalls/enhancedSignatures/optional/optionalIfPresent.txt b/compiler/testData/resolvedCalls/enhancedSignatures/optional/optionalIfPresent.txt index 3c2ff5d47bf..96043a2e2ba 100644 --- a/compiler/testData/resolvedCalls/enhancedSignatures/optional/optionalIfPresent.txt +++ b/compiler/testData/resolvedCalls/enhancedSignatures/optional/optionalIfPresent.txt @@ -3,14 +3,14 @@ import java.util.* fun use(v: Optional) { 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): Unit defined in java.util.Optional + // SUBSTITUTED: fun ifPresent(Consumer): Unit defined in java.util.Optional } fun use2(v: Optional) { 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): Unit defined in java.util.Optional + // SUBSTITUTED: fun ifPresent(Consumer): Unit defined in java.util.Optional }