FIR: Add workaround for OverloadResolutionByLambdaReturnType
Mostly, that should help for existing flatMap usages ^KT-43129 Submitted
This commit is contained in:
@@ -3,18 +3,18 @@
|
||||
class A
|
||||
|
||||
fun test_1(list: List<Set<A>>) {
|
||||
list.<!AMBIGUITY!>flatMapTo<!>(mutableSetOf()) { <!UNRESOLVED_REFERENCE!>it<!> }
|
||||
list.flatMapTo(mutableSetOf()) { it }
|
||||
}
|
||||
|
||||
fun test_2(list: List<Set<A>>) {
|
||||
sequence<A> {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ERROR CLASS: Ambiguity: flatMapTo, [kotlin/collections/flatMapTo, kotlin/collections/flatMapTo]")!>list.<!AMBIGUITY!>flatMapTo<!>(mutableSetOf()) { <!UNRESOLVED_REFERENCE!>it<!> }<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableSet<A>")!>list.flatMapTo(mutableSetOf()) { it }<!>
|
||||
}
|
||||
}
|
||||
|
||||
fun test_3(list: List<Set<A>>) {
|
||||
sequence {
|
||||
list.<!AMBIGUITY!>flatMapTo<!>(mutableSetOf()) { <!UNRESOLVED_REFERENCE!>it<!> }
|
||||
list.flatMapTo(mutableSetOf()) { it }
|
||||
yield(A())
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,6 @@ fun test_3(list: List<Set<A>>) {
|
||||
fun test_4(list: List<Set<A>>) {
|
||||
sequence {
|
||||
yield(A())
|
||||
list.<!AMBIGUITY!>flatMapTo<!>(mutableSetOf()) { <!UNRESOLVED_REFERENCE!>it<!> }
|
||||
list.flatMapTo(mutableSetOf()) { it }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user