FIR: Add workaround for OverloadResolutionByLambdaReturnType
Mostly, that should help for existing flatMap usages ^KT-43129 Submitted
This commit is contained in:
-10
@@ -1,10 +0,0 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// WITH_RUNTIME
|
||||
|
||||
|
||||
fun <T> List<Option<T>>.flatten(): List<T> = <!AMBIGUITY!>flatMap<!> { <!UNRESOLVED_REFERENCE!>it<!>.<!NONE_APPLICABLE!>fold<!>(::emptyList, <!UNRESOLVED_REFERENCE!>::listOf<!>) }
|
||||
|
||||
class Option<out T> {
|
||||
fun <R> fold(ifEmpty: () -> R, ifSome: (T) -> R): R = TODO()
|
||||
}
|
||||
compiler/testData/diagnostics/tests/callableReference/resolve/resolveTwoReferencesAgainstGenerics.kt
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// WITH_RUNTIME
|
||||
|
||||
Reference in New Issue
Block a user