Files
kotlin-fork/compiler/testData/diagnostics/tests/ResolveToJava.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

58 lines
1.1 KiB
Kotlin
Vendored

// !CHECK_TYPE
// SKIP_JAVAC
// FULL_JDK
// FILE: a.kt
import java.*
import java.util.*
import utils.*
import java.io.PrintStream
import java.lang.Comparable as Com
val l : MutableList<in Int> = ArrayList<Int>()
fun test(l : java.util.List<Int>) {
val x : <!UNRESOLVED_REFERENCE!>java.List<!>
val y : java.util.List<Int>
val b : java.lang.Object
val z : <!UNRESOLVED_REFERENCE!>java.utils.List<Int><!>
val f : java.io.File? = null
Collections.<!UNRESOLVED_REFERENCE!>emptyList<!>
Collections.<!UNRESOLVED_REFERENCE!>emptyList<!><Int>
Collections.emptyList<Int>()
Collections.emptyList()
checkSubtype<Set<Int>?>(Collections.singleton<Int>(1))
Collections.singleton<Int>(<!ARGUMENT_TYPE_MISMATCH!>1.0<!>)
<!NO_COMPANION_OBJECT!>List<!><Int>
val o = "sdf" as Object
try {
// ...
}
catch(e: Exception) {
System.out.println(e.message)
}
PrintStream("sdf")
val c : Com<Int>? = null
checkSubtype<java.lang.Comparable<Int>?>(c)
// Collections.sort<Integer>(ArrayList<Integer>())
xxx.<!UNRESOLVED_REFERENCE!>Class<!>()
}
// FILE: b.kt
package xxx
import java.lang.Class;