FIR IDE: run FIR highlighting test on all test data
Similarly to FIR diagnostic tests. This commit enable all available test data and check the reported error messages by FIR. This helps identify some issues in formatting of FIR diagnostics. The changes on the test file are mechanically generated. Failed tests are disabled with `// IGNORE_FIR` and are re-enabled in the second commit.
This commit is contained in:
committed by
Dmitriy Novozhilov
parent
6592407492
commit
f38c0cf348
+48
@@ -0,0 +1,48 @@
|
||||
import java.*
|
||||
import java.util.*
|
||||
import utils.*
|
||||
|
||||
import java.io.PrintStream
|
||||
import java.lang.Comparable as Com
|
||||
|
||||
fun <T> checkSubtype(t: T) = t
|
||||
|
||||
val l : MutableList<in Int> = ArrayList<Int>()
|
||||
|
||||
fun test(l : List<Int>) {
|
||||
val x : <error descr="[UNRESOLVED_REFERENCE] Unresolved reference: java.List">java.List</error>
|
||||
val y : List<Int>
|
||||
val b : java.lang.Object
|
||||
val a : java.util.List<Int>
|
||||
val z : <error descr="[UNRESOLVED_REFERENCE] Unresolved reference: java.utils.List<R|kotlin/Int|>">java.utils.List<Int></error>
|
||||
|
||||
val f : java.io.File? = null
|
||||
|
||||
Collections.<error descr="[UNRESOLVED_REFERENCE] Unresolved reference: emptyList">emptyList</error>
|
||||
Collections.<error descr="[UNRESOLVED_REFERENCE] Unresolved reference: emptyList">emptyList</error><Int>
|
||||
Collections.emptyList<Int>()
|
||||
Collections.emptyList()
|
||||
|
||||
checkSubtype<Set<Int>?>(Collections.singleton<Int>(1))
|
||||
Collections.<error descr="[INAPPLICABLE_CANDIDATE] Inapplicable candidate(s): java/util/Collections.singleton">singleton</error><Int>(1.0)
|
||||
|
||||
List<Int>
|
||||
|
||||
|
||||
val o = "sdf" as Object
|
||||
|
||||
try {
|
||||
// ...
|
||||
}
|
||||
catch(e: Throwable) {
|
||||
System.out.println(e.message)
|
||||
}
|
||||
|
||||
PrintStream("sdf")
|
||||
|
||||
val c : Com<Int>? = null
|
||||
|
||||
checkSubtype<java.lang.Comparable<Int>?>(c)
|
||||
|
||||
// Collections.sort<Integer>(ArrayList<Integer>())
|
||||
}
|
||||
Reference in New Issue
Block a user