FIR: fix test data after Make 'statics visible from nested classes'

This commit is contained in:
Mikhail Glukhikh
2019-12-17 12:24:14 +03:00
parent 7b1771d432
commit 9f1f743d55
15 changed files with 60 additions and 64 deletions
+9 -13
View File
@@ -1,27 +1,23 @@
FILE: enumWithCompanion.kt FILE: enumWithCompanion.kt
public final enum class EC : R|kotlin/Enum<EC>| { public final enum class EC : R|kotlin/Enum<EC>| {
private constructor(): R|EC| { private constructor(): R|EC| {
super<R|kotlin/Enum<EC>|>() super<R|kotlin/Any|>()
} }
public final static val A: R|EC| = object : R|EC| { public final enum entry A : R|kotlin/Any| {
private constructor(): R|EC| { public constructor(): R|EC.A| {
super<R|EC|>() super<R|kotlin/Any|>()
} }
} }
public final enum entry B : R|kotlin/Any| {
public constructor(): R|EC.B| {
public final static val B: R|EC| = object : R|EC| { super<R|kotlin/Any|>()
private constructor(): R|EC| {
super<R|EC|>()
} }
} }
public final companion object Companion : R|kotlin/Any| { public final companion object Companion : R|kotlin/Any| {
private constructor(): R|EC.Companion| { private constructor(): R|EC.Companion| {
super<R|kotlin/Any|>() super<R|kotlin/Any|>()
@@ -29,10 +25,10 @@ FILE: enumWithCompanion.kt
public final fun u(ec: R|EC|): R|kotlin/Boolean| { public final fun u(ec: R|EC|): R|kotlin/Boolean| {
^u when (R|<local>/ec|) { ^u when (R|<local>/ec|) {
==($subj$, R|/EC.A|) -> { ==($subj$, Q|EC.A|) -> {
Boolean(true) Boolean(true)
} }
==($subj$, R|/EC.B|) -> { ==($subj$, Q|EC.B|) -> {
Boolean(false) Boolean(false)
} }
} }
@@ -3,9 +3,9 @@ enum class E {
companion object { companion object {
fun foo(): E = ENTRY fun foo(): E = ENTRY
fun bar(): Array<E> = <!UNRESOLVED_REFERENCE!>values<!>() fun bar(): Array<E> = values()
fun baz(): E = <!UNRESOLVED_REFERENCE!>valueOf<!>("ENTRY") fun baz(): E = valueOf("ENTRY")
val valuez = <!UNRESOLVED_REFERENCE!>values<!>() val valuez = values()
} }
fun oof(): E = ENTRY fun oof(): E = ENTRY
@@ -28,10 +28,10 @@ open class Base {
class Derived : Base() { class Derived : Base() {
fun test(javaStaticInTypePosition: Classifier) { fun test(javaStaticInTypePosition: Classifier) {
<!UNRESOLVED_REFERENCE!>method<!>() method()
<!UNRESOLVED_REFERENCE!>property<!> property
Classifier() Classifier()
<!UNRESOLVED_REFERENCE!>syntheticSam<!> { } syntheticSam { }
// Instance members shouldn't be affected, but we check them, just in case // Instance members shouldn't be affected, but we check them, just in case
val y = <!UNRESOLVED_REFERENCE!>instanceSyntheticProperty<!> val y = <!UNRESOLVED_REFERENCE!>instanceSyntheticProperty<!>
@@ -28,10 +28,10 @@ open class Base {
class Derived : Base() { class Derived : Base() {
fun test(javaStaticInTypePosition: Classifier) { fun test(javaStaticInTypePosition: Classifier) {
<!UNRESOLVED_REFERENCE!>method<!>() method()
<!UNRESOLVED_REFERENCE!>property<!> property
Classifier() Classifier()
<!UNRESOLVED_REFERENCE!>syntheticSam<!> { } syntheticSam { }
// Instance members shouldn't be affected, but we check them, just in case // Instance members shouldn't be affected, but we check them, just in case
val y = <!UNRESOLVED_REFERENCE!>instanceSyntheticProperty<!> val y = <!UNRESOLVED_REFERENCE!>instanceSyntheticProperty<!>
@@ -18,36 +18,36 @@ open class A {
class B : J2() { class B : J2() {
init { init {
<!UNRESOLVED_REFERENCE!>foo<!>() foo()
bar() bar()
boo() boo()
} }
fun test2() { fun test2() {
<!UNRESOLVED_REFERENCE!>foo<!>() foo()
bar() bar()
boo() boo()
} }
object O { object O {
fun test() { fun test() {
<!UNRESOLVED_REFERENCE!>foo<!>() foo()
bar() bar()
<!UNRESOLVED_REFERENCE!>boo<!>() boo()
} }
} }
companion object { companion object {
init { init {
<!UNRESOLVED_REFERENCE!>foo<!>() foo()
bar() bar()
<!UNRESOLVED_REFERENCE!>boo<!>() boo()
} }
fun test() { fun test() {
<!UNRESOLVED_REFERENCE!>foo<!>() foo()
bar() bar()
<!UNRESOLVED_REFERENCE!>boo<!>() boo()
} }
fun bar() {} fun bar() {}
@@ -18,36 +18,36 @@ open class A {
class B : J2() { class B : J2() {
init { init {
<!UNRESOLVED_REFERENCE!>foo<!>() foo()
bar() bar()
boo() boo()
} }
fun test2() { fun test2() {
<!UNRESOLVED_REFERENCE!>foo<!>() foo()
bar() bar()
boo() boo()
} }
object O { object O {
fun test() { fun test() {
<!UNRESOLVED_REFERENCE!>foo<!>() foo()
bar() bar()
<!UNRESOLVED_REFERENCE!>boo<!>() boo()
} }
} }
companion object { companion object {
init { init {
<!UNRESOLVED_REFERENCE!>foo<!>() foo()
bar() bar()
<!UNRESOLVED_REFERENCE!>boo<!>() boo()
} }
fun test() { fun test() {
<!UNRESOLVED_REFERENCE!>foo<!>() foo()
bar() bar()
<!UNRESOLVED_REFERENCE!>boo<!>() boo()
} }
fun bar() {} fun bar() {}
@@ -13,30 +13,30 @@ open class A {
class B : A() { class B : A() {
init { init {
<!UNRESOLVED_REFERENCE!>foo<!>() foo()
bar() bar()
} }
fun test2() { fun test2() {
<!UNRESOLVED_REFERENCE!>foo<!>() foo()
bar() bar()
} }
object O { object O {
fun test() { fun test() {
<!UNRESOLVED_REFERENCE!>foo<!>() foo()
bar() bar()
} }
} }
companion object { companion object {
init { init {
<!UNRESOLVED_REFERENCE!>foo<!>() foo()
bar() bar()
} }
fun test() { fun test() {
<!UNRESOLVED_REFERENCE!>foo<!>() foo()
bar() bar()
} }
@@ -13,30 +13,30 @@ open class A {
class B : A() { class B : A() {
init { init {
<!UNRESOLVED_REFERENCE!>foo<!>() foo()
bar() bar()
} }
fun test2() { fun test2() {
<!UNRESOLVED_REFERENCE!>foo<!>() foo()
bar() bar()
} }
object O { object O {
fun test() { fun test() {
<!UNRESOLVED_REFERENCE!>foo<!>() foo()
bar() bar()
} }
} }
companion object { companion object {
init { init {
<!UNRESOLVED_REFERENCE!>foo<!>() foo()
bar() bar()
} }
fun test() { fun test() {
<!UNRESOLVED_REFERENCE!>foo<!>() foo()
bar() bar()
} }
@@ -27,7 +27,7 @@ open class A<T> : J() {
object O { object O {
fun test() { fun test() {
<!UNRESOLVED_REFERENCE!>foo<!>() foo()
bar() bar()
val a: Int = <!UNRESOLVED_REFERENCE!>baz<!>() val a: Int = <!UNRESOLVED_REFERENCE!>baz<!>()
val b: T = <!UNRESOLVED_REFERENCE!>baz<!>() val b: T = <!UNRESOLVED_REFERENCE!>baz<!>()
@@ -27,7 +27,7 @@ open class A<T> : J() {
object O { object O {
fun test() { fun test() {
<!UNRESOLVED_REFERENCE!>foo<!>() foo()
bar() bar()
val a: Int = <!UNRESOLVED_REFERENCE!>baz<!>() val a: Int = <!UNRESOLVED_REFERENCE!>baz<!>()
val b: T = <!UNRESOLVED_REFERENCE!>baz<!>() val b: T = <!UNRESOLVED_REFERENCE!>baz<!>()
@@ -12,20 +12,20 @@ open class B : J() {
class A { class A {
init { init {
<!UNRESOLVED_REFERENCE!>foo<!>() foo()
bar() bar()
<!UNRESOLVED_REFERENCE!>baz<!>() <!UNRESOLVED_REFERENCE!>baz<!>()
} }
fun test1() { fun test1() {
<!UNRESOLVED_REFERENCE!>foo<!>() foo()
bar() bar()
<!UNRESOLVED_REFERENCE!>baz<!>() <!UNRESOLVED_REFERENCE!>baz<!>()
} }
object O { object O {
fun test() { fun test() {
<!UNRESOLVED_REFERENCE!>foo<!>() foo()
bar() bar()
<!UNRESOLVED_REFERENCE!>baz<!>() <!UNRESOLVED_REFERENCE!>baz<!>()
} }
@@ -12,20 +12,20 @@ open class B : J() {
class A { class A {
init { init {
<!UNRESOLVED_REFERENCE!>foo<!>() foo()
bar() bar()
<!UNRESOLVED_REFERENCE!>baz<!>() <!UNRESOLVED_REFERENCE!>baz<!>()
} }
fun test1() { fun test1() {
<!UNRESOLVED_REFERENCE!>foo<!>() foo()
bar() bar()
<!UNRESOLVED_REFERENCE!>baz<!>() <!UNRESOLVED_REFERENCE!>baz<!>()
} }
object O { object O {
fun test() { fun test() {
<!UNRESOLVED_REFERENCE!>foo<!>() foo()
bar() bar()
<!UNRESOLVED_REFERENCE!>baz<!>() <!UNRESOLVED_REFERENCE!>baz<!>()
} }
@@ -7,18 +7,18 @@ public class J {
// FILE: test.kt // FILE: test.kt
class A { class A {
init { init {
<!UNRESOLVED_REFERENCE!>foo<!>() foo()
bar() bar()
} }
fun test1() { fun test1() {
<!UNRESOLVED_REFERENCE!>foo<!>() foo()
bar() bar()
} }
object O { object O {
fun test() { fun test() {
<!UNRESOLVED_REFERENCE!>foo<!>() foo()
bar() bar()
} }
} }
@@ -7,18 +7,18 @@ public class J {
// FILE: test.kt // FILE: test.kt
class A { class A {
init { init {
<!UNRESOLVED_REFERENCE!>foo<!>() foo()
bar() bar()
} }
fun test1() { fun test1() {
<!UNRESOLVED_REFERENCE!>foo<!>() foo()
bar() bar()
} }
object O { object O {
fun test() { fun test() {
<!UNRESOLVED_REFERENCE!>foo<!>() foo()
bar() bar()
} }
} }
@@ -10,8 +10,8 @@ public class A {
class B: A() { class B: A() {
companion object { companion object {
init { init {
val a: Int = <!UNRESOLVED_REFERENCE!>foo<!>() val a: Int = foo()
val b: Int = <!UNRESOLVED_REFERENCE!>bar<!> val b: Int = bar
} }
} }