Files
kotlin-fork/compiler/testData/diagnostics/testsWithStdLib/elvisOnJavaList.fir.kt
T
Denis.Zharkov 00821bbc63 FIR: Update test data (repeated diagnostics)
They are a bit redundant, but it needs additional work to be done
to avoid them
2021-05-20 17:24:33 +03:00

20 lines
421 B
Kotlin
Vendored

// !WITH_NEW_INFERENCE
// 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 <!RETURN_TYPE_MISMATCH!>c.getList() ?: <!TYPE_MISMATCH!>listOf()<!><!>
}