Files
kotlin-fork/compiler/testData/diagnostics/testsWithStdLib/builderInference/buildListRemoveAddInBranches.kt
T
2023-08-28 09:40:26 +00:00

9 lines
168 B
Kotlin
Vendored

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