FIR: Add workaround for flatMap issue

This commit is contained in:
Denis.Zharkov
2021-03-30 16:44:51 +03:00
parent 4d3825a824
commit 55e5af1111
2 changed files with 6 additions and 9 deletions
@@ -20,17 +20,17 @@ fun takeString(s: String) {}
fun takeInt(s: Int) {}
fun test_1() {
val x = <!AMBIGUITY!>create<!> { "" }
val x = create { "" }
takeString(x)
}
fun test_2() {
val x = <!AMBIGUITY!>create<!> { 1 }
val x = create { 1 }
takeInt(x)
}
fun test_3() {
val x = <!AMBIGUITY!>create<!> { 1.0 }
val x = create { 1.0 }
}
@OverloadResolutionByLambdaReturnType
@@ -38,11 +38,11 @@ fun <K> create(x: K, f: (K) -> Int): Int = 1
fun <T> create(x: T, f: (T) -> String): String = ""
fun test_4() {
val x = <!AMBIGUITY!>create<!>("") { "" }
val x = create("") { "" }
takeString(x)
}
fun test_5() {
val x = <!AMBIGUITY!>create<!>("") { 1 }
val x = create("") { 1 }
takeInt(x)
}