Files
kotlin-fork/compiler/testData/diagnostics/testsWithStdLib/builderInference/buildListRemoveAddInBranches.kt
T

9 lines
168 B
Kotlin
Vendored

// ISSUE: KT-55168
fun foo(arg: Boolean) = buildList {
if (arg) <!TYPE_MISMATCH!>{
<!TYPE_MISMATCH!>removeLast()<!>
}<!> else {
add(42)
}
}