Files
kotlin-fork/compiler/testData/diagnostics/testsWithStdLib/builderInference/buildListToUpperBound.kt
T
2023-03-17 12:08:36 +00:00

12 lines
261 B
Kotlin
Vendored

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