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
@@ -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()
}
}