Files
kotlin-fork/compiler/testData/diagnostics/testsWithStdLib/builderInference/buildListToUpperBound.fir.kt
T
Mikhail Glukhikh ba2d896c01 FE: split test "buildList type argument is inferred into upper bound"
Related to KT-50520, KT-56169
2023-03-17 12:08:35 +00:00

12 lines
268 B
Kotlin
Vendored

// WITH_STDLIB
// !LANGUAGE: -ForbidInferringPostponedTypeVariableIntoDeclaredUpperBound
// ISSUE: KT-50520
fun box(): String {
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>buildList<!> {
val foo = { first() }
add(0, foo)
}
return "OK"
}