mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 15:53:55 +00:00
17 lines
408 B
Kotlin
Vendored
17 lines
408 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 c.getList() ?: <!TYPE_INFERENCE_EXPECTED_TYPE_MISMATCH, TYPE_MISMATCH!>listOf()<!>
|
|
} |