| // RUN_PIPELINE_TILL: FRONTEND | |
| // CHECK_TYPE | |
| // FULL_JDK | |
| // WITH_EXTRA_CHECKERS | |
| // FILE: a.kt | |
| import java.* | |
| import java.util.* | |
| import <!UNRESOLVED_IMPORT!>utils<!>.* | |
| import java.io.PrintStream | |
| import <!PLATFORM_CLASS_MAPPED_TO_KOTLIN!>java.lang.Comparable<!> as Com | |
| val l : MutableList<in Int> = ArrayList<Int>() | |
| fun test(l : <!PLATFORM_CLASS_MAPPED_TO_KOTLIN!>java.util.List<Int><!>) { | |
| val x : java.<!UNRESOLVED_REFERENCE!>List<!> | |
| val y : <!PLATFORM_CLASS_MAPPED_TO_KOTLIN!>java.util.List<Int><!> | |
| val b : <!PLATFORM_CLASS_MAPPED_TO_KOTLIN!>java.lang.Object<!> | |
| val z : java.<!UNRESOLVED_REFERENCE!>utils<!>.List<Int> | |
| val f : java.io.File? = null | |
| Collections.<!CANNOT_INFER_PARAMETER_TYPE, FUNCTION_CALL_EXPECTED!>emptyList<!> | |
| Collections.<!FUNCTION_CALL_EXPECTED!>emptyList<!><!EXPLICIT_TYPE_ARGUMENTS_IN_PROPERTY_ACCESS!><Int><!> | |
| Collections.emptyList<Int>() | |
| Collections.<!CANNOT_INFER_PARAMETER_TYPE!>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 <!PLATFORM_CLASS_MAPPED_TO_KOTLIN!>Object<!> | |
| try { | |
| // ... | |
| } | |
| catch(e: Exception) { | |
| System.out.println(e.message) | |
| } | |
| PrintStream("sdf") | |
| val c : <!PLATFORM_CLASS_MAPPED_TO_KOTLIN!>Com<Int><!>? = null | |
| checkSubtype<<!PLATFORM_CLASS_MAPPED_TO_KOTLIN!>java.lang.Comparable<Int><!>?>(c) | |
| // Collections.sort<Integer>(ArrayList<Integer>()) | |
| xxx.<!UNRESOLVED_REFERENCE!>Class<!>() | |
| java.lang.<!PLATFORM_CLASS_MAPPED_TO_KOTLIN!>String<!>() | |
| } | |
| // FILE: b.kt | |
| package xxx | |
| import java.lang.Class; | |
| /* GENERATED_FIR_TAGS: asExpression, classDeclaration, flexibleType, funWithExtensionReceiver, functionDeclaration, | |
| functionalType, inProjection, infix, integerLiteral, javaFunction, javaProperty, localProperty, nullableType, | |
| propertyDeclaration, stringLiteral, tryExpression, typeParameter, typeWithExtension */ |