Files
kotlin-fork/compiler/testData/diagnostics/testsWithStdLib/elvisOnJavaList.kt
T
2021-05-28 15:36:24 +03:00

18 lines
370 B
Kotlin
Vendored

// FILE: P.java
import java.util.ArrayList;
import java.util.List;
public class P {
public List<Integer> getList() {
return new ArrayList<Integer>();
}
}
// FILE: Test.kt
fun foo(c: P): MutableList<Int> {
// Error should be here: see KT-8168 Typechecker fails for platform collection type
return <!TYPE_MISMATCH!>c.getList() ?: listOf()<!>
}