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,12 +0,0 @@
enum class E {
E1 {
override fun foo() = outerFun() + super.outerFun()
},
E2 {
override fun foo() = E1.foo()
};
abstract fun foo(): Int
fun outerFun() = 42
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
enum class E {
E1 {
override fun foo() = outerFun() + super.outerFun()
@@ -1,28 +0,0 @@
class Outer {
class Nested
inner class Inner
fun Inner.foo() {
Outer()
Nested()
Inner()
}
fun Nested.bar() {
Outer()
Nested()
Inner()
}
fun Outer.baz() {
Outer()
Nested()
Inner()
}
}
fun Outer.foo() {
Outer()
<!UNRESOLVED_REFERENCE!>Nested<!>()
Inner()
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
class Outer {
class Nested
inner class Inner
@@ -1,13 +0,0 @@
// !LANGUAGE: +InnerClassInEnumEntryClass
enum class A {
X {
val x = 1
fun foo() {}
inner class Inner {
val y = x
fun bar() = foo()
}
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !LANGUAGE: +InnerClassInEnumEntryClass
enum class A {
@@ -1,18 +0,0 @@
class Outer {
fun foo(): Int {
if (outerState > 0) return outerState
class Local {
val localState = outerState
inner class LocalInner {
val o = outerState
val l = localState
}
}
return Local().localState
}
val outerState = 42
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
class Outer {
fun foo(): Int {
if (outerState > 0) return outerState
@@ -1,11 +0,0 @@
class Outer {
class Nested {
fun foo() {
class Local {
val state = <!UNRESOLVED_REFERENCE!>outerState<!>
}
}
}
val outerState = 42
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
class Outer {
class Nested {
fun foo() {
@@ -1,8 +0,0 @@
open class Outer {
class Nested : Outer() {
fun bar() = foo()
fun baz() = super.foo()
}
fun foo() = 42
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
open class Outer {
class Nested : Outer() {
fun bar() = foo()
@@ -1,12 +0,0 @@
open class Outer<T> {
class Nested<U> : Outer<U>() {
fun bar(): U = foo()
fun baz(): U = super.foo()
}
class Nested2 : Outer<String>() {
fun bar(): String = foo()
fun baz(): String = super.foo()
}
fun foo(): T = null!!
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
open class Outer<T> {
class Nested<U> : Outer<U>() {
fun bar(): U = foo()
@@ -1,16 +0,0 @@
object Object {
class NestedClass {
fun test() {
outerFun()
outerVal
OuterObject
OuterClass()
}
}
fun outerFun() {}
val outerVal = 4
object OuterObject
class OuterClass
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
object Object {
class NestedClass {
fun test() {
@@ -1,13 +0,0 @@
// KT-2100
interface I {
val x : String
}
class Foo {
protected val x : String = ""
inner class Inner : I {
override val x : String = this@Foo.x
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// KT-2100
interface I {
@@ -1,9 +0,0 @@
open class Base {
fun foo() {}
}
class Derived : Base() {
class Nested {
fun bar() = <!UNRESOLVED_REFERENCE!>foo<!>()
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
open class Base {
fun foo() {}
}
@@ -1,14 +0,0 @@
class Outer {
class Nested {
companion object {
fun foo() = 42
}
}
companion object {
fun bar() = 239
}
}
fun foo() = Outer.Nested.foo()
fun bar() = Outer.bar()
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
class Outer {
class Nested {
companion object {
@@ -1,5 +0,0 @@
fun bar(b: Boolean) = b
fun foo(data: List<String>) {
bar(data.contains(""))
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
fun bar(b: Boolean) = b
fun foo(data: List<String>) {
@@ -1,7 +0,0 @@
enum class E {
E1,
E2 { };
}
fun foo() = E.E1
fun bar() = E.E2
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
enum class E {
E1,
E2 { };
@@ -1,17 +0,0 @@
// FILE: a.kt
class A {
class B {
class C
}
}
// FILE: b.kt
import A.B
import A.B.C
val a = A()
val b = B()
val ab = A.B()
val c = C()
val bc = B.C()
val abc = A.B.C()
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// FILE: a.kt
class A {
class B {
@@ -1,8 +0,0 @@
package A
class B {
class C {
}
}
val a = A.B.C()
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
package A
class B {
@@ -1,9 +0,0 @@
class A {
enum class E {
E1,
E2 { };
}
}
fun foo() = A.E.E1
fun bar() = A.E.E2
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
class A {
enum class E {
E1,
@@ -1,7 +0,0 @@
object A {
object B {
object C
}
}
val a = A.B.C
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
object A {
object B {
object C
@@ -1,11 +0,0 @@
abstract class Outer {
class Nested {
class NestedNested
}
abstract val prop1: Nested
abstract val prop2: Nested.NestedNested
}
fun foo(): Outer.Nested = null!!
val bar: Outer.Nested.NestedNested = null!!
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
abstract class Outer {
class Nested {
class NestedNested
@@ -1,9 +0,0 @@
open class PackageTest
class MoreTest() {
companion object: PackageTest() {
}
object Some: PackageTest()
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
open class PackageTest
class MoreTest() {
-11
View File
@@ -1,11 +0,0 @@
// KT-1188
interface Foo {
val b : Bar
val b1 : Foo.Bar
interface Bar {}
}
interface Foo2 : Foo {
val bb1 : Foo.Bar
}
+1
View File
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// KT-1188
interface Foo {