Files
kotlin-fork/compiler/testData/diagnostics/testsWithStdLib/elvisOnJavaList.fir.kt
T
Denis.Zharkov 2ecba6ac39 Remove WITH_NEW_INFERENCE directive from all tests
This directive anyway does not make test run twice with OI, and with NI
It only once run the test with specific settings (// LANGUAGE)
and ignores irrelevant (OI or NI tags)
2021-05-25 13:28:26 +03:00

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