FIR: Fix test data after rewritten scope structure

Mostly, the semantics for statics/companions has been changed there
Fixed test data now is much closer to semantics of old FE
This commit is contained in:
Denis Zharkov
2020-05-07 13:06:30 +03:00
parent f64c12efac
commit f71a56e742
29 changed files with 77 additions and 362 deletions
@@ -33,9 +33,9 @@ class C: B(), A {
B.Companion.bar()
C.<!UNRESOLVED_REFERENCE!>bar<!>()
B_()
<!UNRESOLVED_REFERENCE!>B_<!>()
B.<!UNRESOLVED_REFERENCE!>B_<!>()
B.Companion.B_()
C.<!UNRESOLVED_REFERENCE!>B_<!>()
}
}
}
@@ -43,10 +43,10 @@ class D: C() {
C.<!UNRESOLVED_REFERENCE!>bar<!>()
D.<!UNRESOLVED_REFERENCE!>bar<!>()
B_()
<!UNRESOLVED_REFERENCE!>B_<!>()
B.<!UNRESOLVED_REFERENCE!>B_<!>()
B.Companion.B_()
C.<!UNRESOLVED_REFERENCE!>B_<!>()
D.<!UNRESOLVED_REFERENCE!>B_<!>()
}
}
}
@@ -30,7 +30,7 @@ class E: A() {
B().<!UNRESOLVED_REFERENCE!>bar<!>()
D()
C()
<!UNRESOLVED_REFERENCE!>C<!>()
}
object Z {
@@ -39,7 +39,7 @@ class E: A() {
B().<!UNRESOLVED_REFERENCE!>bar<!>()
D()
C()
<!UNRESOLVED_REFERENCE!>C<!>()
}
}
}
@@ -9,19 +9,19 @@ interface B {
}
class X: A {
val a: A_ = A_()
val a: A_ = <!UNRESOLVED_REFERENCE!>A_<!>()
val b: A.A_ = A.A_()
companion object {
val a: A_ = A_()
val a: A_ = <!UNRESOLVED_REFERENCE!>A_<!>()
}
}
class Y: B {
val a: B_ = B_()
val a: B_ = <!UNRESOLVED_REFERENCE!>B_<!>()
val b: B.B_ = B.B_()
companion object {
val b: B_ = B_()
val b: B_ = <!UNRESOLVED_REFERENCE!>B_<!>()
}
}
@@ -10,14 +10,14 @@ class C: A() {
val b: B = null!!
init {
B()
<!UNRESOLVED_REFERENCE!>B<!>()
}
object O {
val b: B = null!!
init {
B()
<!UNRESOLVED_REFERENCE!>B<!>()
}
}
@@ -25,7 +25,7 @@ class C: A() {
val b: B = null!!
init {
B()
<!UNRESOLVED_REFERENCE!>B<!>()
}
}
@@ -33,7 +33,7 @@ class C: A() {
val b: B = null!!
init {
B()
<!UNRESOLVED_REFERENCE!>B<!>()
}
}
}
}
@@ -28,7 +28,7 @@ open class A {
class Simple: A() {
init {
Y().A_Y()
Z().A_C_Z()
<!UNRESOLVED_REFERENCE!>Z<!>().<!UNRESOLVED_REFERENCE!>A_C_Z<!>()
}
}
@@ -86,10 +86,10 @@ class C: A() {
}
init {
Y().<!UNRESOLVED_REFERENCE!>C_C_Y<!>()
Y().A_Y()
Y().C_C_Y()
Y().<!UNRESOLVED_REFERENCE!>A_Y<!>()
Z().C_C_Z()
Z().<!UNRESOLVED_REFERENCE!>A_C_Z<!>()
}
}
}
@@ -42,6 +42,6 @@ class Y: C() {
init {
Y().A_Y()
Z().A_C_Z()
<!UNRESOLVED_REFERENCE!>Z<!>().<!UNRESOLVED_REFERENCE!>A_C_Z<!>()
}
}
}
@@ -26,7 +26,7 @@ class X: A {
val a_s: A_S = null!!
init {
A_S()
<!UNRESOLVED_REFERENCE!>A_S<!>()
A.A_S()
X.<!UNRESOLVED_REFERENCE!>A_S<!>()
}
@@ -35,7 +35,7 @@ class X: A {
val a_: A_S = null!!
init {
A_S()
<!UNRESOLVED_REFERENCE!>A_S<!>()
}
}
}
@@ -71,7 +71,7 @@ class Z: C() {
val b_s: B_S = null!!
init {
A_S()
<!UNRESOLVED_REFERENCE!>A_S<!>()
B_()
B_S()
}
@@ -82,7 +82,7 @@ class Z: C() {
val b_s: B_S = null!!
init {
A_S()
<!UNRESOLVED_REFERENCE!>A_S<!>()
B_()
B_S()
}
@@ -41,7 +41,7 @@ class X: D() {
D.<!UNRESOLVED_REFERENCE!>B_<!>()
X.<!UNRESOLVED_REFERENCE!>B_<!>()
A_S()
<!UNRESOLVED_REFERENCE!>A_S<!>()
A.A_S()
C.<!UNRESOLVED_REFERENCE!>A_S<!>()
D.<!UNRESOLVED_REFERENCE!>A_S<!>()
@@ -53,7 +53,7 @@ class X: D() {
D.<!UNRESOLVED_REFERENCE!>B_S<!>()
X.<!UNRESOLVED_REFERENCE!>B_S<!>()
E_S()
<!UNRESOLVED_REFERENCE!>E_S<!>()
E.E_S()
D.<!UNRESOLVED_REFERENCE!>E_S<!>()
X.<!UNRESOLVED_REFERENCE!>E_S<!>()
@@ -67,7 +67,7 @@ class Y: F() {
F.<!UNRESOLVED_REFERENCE!>B_<!>()
Y.<!UNRESOLVED_REFERENCE!>B_<!>()
A_S()
<!UNRESOLVED_REFERENCE!>A_S<!>()
F.<!UNRESOLVED_REFERENCE!>A_S<!>()
Y.<!UNRESOLVED_REFERENCE!>A_S<!>()
@@ -75,7 +75,7 @@ class Y: F() {
F.<!UNRESOLVED_REFERENCE!>B_S<!>()
Y.<!UNRESOLVED_REFERENCE!>B_S<!>()
E_S()
<!UNRESOLVED_REFERENCE!>E_S<!>()
F.<!UNRESOLVED_REFERENCE!>E_S<!>()
Y.<!UNRESOLVED_REFERENCE!>E_S<!>()
}
@@ -32,7 +32,7 @@ class B: A() {
X().A_X()
X().<!UNRESOLVED_REFERENCE!>T_X<!>()
Y().A_C_Y()
Y().<!UNRESOLVED_REFERENCE!>T_Y<!>()
Y().<!UNRESOLVED_REFERENCE!>A_C_Y<!>()
Y().T_Y()
}
}
}
@@ -1,55 +0,0 @@
// !LANGUAGE: +ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion
// FILE: J.java
public class J {
public static void foo() {}
}
// FILE: J2.java
public class J2 extends A {
public static void boo() {}
}
// FILE: test.kt
open class A {
companion object : J() {
fun bar() {}
}
}
class B : J2() {
init {
foo()
bar()
boo()
}
fun test2() {
foo()
bar()
boo()
}
object O {
fun test() {
foo()
bar()
boo()
}
}
companion object {
init {
foo()
bar()
boo()
}
fun test() {
foo()
bar()
boo()
}
fun bar() {}
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !LANGUAGE: +ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion
// FILE: J.java
public class J {
@@ -18,20 +18,20 @@ open class A {
class B : J2() {
init {
foo()
<!UNRESOLVED_REFERENCE!>foo<!>()
bar()
boo()
}
fun test2() {
foo()
<!UNRESOLVED_REFERENCE!>foo<!>()
bar()
boo()
}
object O {
fun test() {
foo()
<!UNRESOLVED_REFERENCE!>foo<!>()
bar()
boo()
}
@@ -39,13 +39,13 @@ class B : J2() {
companion object {
init {
foo()
<!UNRESOLVED_REFERENCE!>foo<!>()
bar()
boo()
}
fun test() {
foo()
<!UNRESOLVED_REFERENCE!>foo<!>()
bar()
boo()
}
@@ -1,46 +0,0 @@
// !LANGUAGE: +ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion
// FILE: J.java
public class J {
public static void foo() {}
}
// FILE: test.kt
open class A {
companion object : J() {
fun bar() {}
}
}
class B : A() {
init {
foo()
bar()
}
fun test2() {
foo()
bar()
}
object O {
fun test() {
foo()
bar()
}
}
companion object {
init {
foo()
bar()
}
fun test() {
foo()
bar()
}
fun bar() {}
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !LANGUAGE: +ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion
// FILE: J.java
public class J {
@@ -13,30 +13,30 @@ open class A {
class B : A() {
init {
foo()
<!UNRESOLVED_REFERENCE!>foo<!>()
bar()
}
fun test2() {
foo()
<!UNRESOLVED_REFERENCE!>foo<!>()
bar()
}
object O {
fun test() {
foo()
<!UNRESOLVED_REFERENCE!>foo<!>()
bar()
}
}
companion object {
init {
foo()
<!UNRESOLVED_REFERENCE!>foo<!>()
bar()
}
fun test() {
foo()
<!UNRESOLVED_REFERENCE!>foo<!>()
bar()
}
@@ -1,50 +0,0 @@
// !LANGUAGE: +ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion
// FILE: J.java
public class J {
public static void foo() {}
}
// FILE: test.kt
open class B : J() {
fun baz() {}
}
class A {
init {
foo()
bar()
baz()
}
fun test1() {
foo()
bar()
baz()
}
object O {
fun test() {
foo()
bar()
baz()
}
}
companion object : B() {
init {
foo()
bar()
baz()
}
fun test() {
foo()
bar()
baz()
}
fun bar() {}
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !LANGUAGE: +ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion
// FILE: J.java
public class J {
@@ -12,20 +12,20 @@ open class B : J() {
class A {
init {
foo()
<!UNRESOLVED_REFERENCE!>foo<!>()
bar()
baz()
}
fun test1() {
foo()
<!UNRESOLVED_REFERENCE!>foo<!>()
bar()
baz()
}
object O {
fun test() {
foo()
<!UNRESOLVED_REFERENCE!>foo<!>()
bar()
baz()
}
@@ -1,39 +0,0 @@
// !LANGUAGE: +ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion
// FILE: J.java
public class J {
public static void foo() {}
}
// FILE: test.kt
class A {
init {
foo()
bar()
}
fun test1() {
foo()
bar()
}
object O {
fun test() {
foo()
bar()
}
}
companion object : J() {
init {
foo()
bar()
}
fun test() {
foo()
bar()
}
fun bar() {}
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !LANGUAGE: +ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion
// FILE: J.java
public class J {
@@ -7,18 +7,18 @@ public class J {
// FILE: test.kt
class A {
init {
foo()
<!UNRESOLVED_REFERENCE!>foo<!>()
bar()
}
fun test1() {
foo()
<!UNRESOLVED_REFERENCE!>foo<!>()
bar()
}
object O {
fun test() {
foo()
<!UNRESOLVED_REFERENCE!>foo<!>()
bar()
}
}