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 @@
fun fn(): Nothing = throw java.lang.RuntimeException("oops")
val x: Nothing = throw java.lang.RuntimeException("oops")
class SomeClass {
fun method() {
throw java.lang.AssertionError("!!!")
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
fun fn(): Nothing = throw java.lang.RuntimeException("oops")
val x: Nothing = throw java.lang.RuntimeException("oops")
@@ -1 +0,0 @@
val stringReversed = String::reversed
@@ -1 +1,2 @@
// FIR_IDENTICAL
val stringReversed = String::reversed
@@ -1,10 +0,0 @@
fun <T1> List<T1>?.foo() {}
@JvmName("foo1")
fun <T2> List<T2>.foo() {}
fun <T1> bar(x: List<T1>) = x
@JvmName("bar1")
fun <T2> bar(x: List<T2>?) = x
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
fun <T1> List<T1>?.foo() {}
@JvmName("foo1")
@@ -1,30 +0,0 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
// FILE: s/SamConstructor.java
package s;
public class SamConstructor {
public SamConstructor(Runnable r) {
}
public static void foo(Runnable r) {}
}
// FILE: 1.kt
package a
fun SamConstructor(a: () -> Unit) {}
// FILE: 2.kt
package b
import s.SamConstructor
import a.*
fun test() {
val a: s.SamConstructor = SamConstructor { }
val b: s.SamConstructor = SamConstructor(null)
SamConstructor.foo(null)
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
// FILE: s/SamConstructor.java
package s;