Introduce FIR_IDENTICAL for FIR vs old frontend tests #KT-36879 Fixed

This commit is contained in:
Mikhail Glukhikh
2020-03-04 17:54:33 +03:00
parent 186e0b0cba
commit 8884cbe415
2268 changed files with 1175 additions and 19754 deletions
@@ -1,9 +0,0 @@
// http://youtrack.jetbrains.net/issue/KT-20
class A() {
val x = 1
companion object {
val y = <!UNRESOLVED_REFERENCE!>x<!>
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// http://youtrack.jetbrains.net/issue/KT-20
class A() {
@@ -1,43 +0,0 @@
// !DIAGNOSTICS: -UNUSED_VARIABLE, -UNUSED_PARAMETER
fun box(): String {
try {
// Objects
val i = Int
val d = Double
val f = Float
val l = Long
val sh = Short
val b = Byte
val ch = Char
val st = String
test(Int)
test(Double)
test(Float)
test(Long)
test(Short)
test(Byte)
test(String)
test(Char)
// Common Double
Double.POSITIVE_INFINITY
Double.NEGATIVE_INFINITY
Double.NaN
// Common Float
Float.POSITIVE_INFINITY
Float.NEGATIVE_INFINITY
Float.NaN
}
catch (e: Throwable) {
return "Error: \n" + e
}
return "OK"
}
fun test(a: Any) {}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_VARIABLE, -UNUSED_PARAMETER
fun box(): String {
@@ -1,11 +0,0 @@
package f
import f.A.Companion.B
class A {
companion object {
class B
}
}
fun test() = B()
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
package f
import f.A.Companion.B
@@ -1,9 +0,0 @@
package test
class Test {
fun test(): Int = 12
companion object {
val a = <!UNRESOLVED_REFERENCE!>test<!>() // Check if resolver will be able to infer type of a variable
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
package test
class Test {