e7e80be34a
Before this commit we considered !isOverride as a sign that function / field / accessor has no overridden symbols. However, it's false for deserialized, because isOverride is always false there. This commit fixes 68 BB tests but breaks 25 BB tests (not yet muted)
18 lines
346 B
Kotlin
Vendored
18 lines
346 B
Kotlin
Vendored
// !LANGUAGE: +NewInference
|
|
// WITH_RUNTIME
|
|
// KJS_WITH_FULL_RUNTIME
|
|
|
|
fun test(foo: MutableList<String>?): List<String> {
|
|
val bar = foo ?: listOf()
|
|
return bar
|
|
}
|
|
|
|
fun box(): String {
|
|
val a = test(null)
|
|
if (a.isNotEmpty()) return "Fail 1"
|
|
|
|
val b = test(mutableListOf("a"))
|
|
if (b.size != 1) return "Fail 2"
|
|
|
|
return "OK"
|
|
} |