From 9f1f743d55c0e6e2b1e506c3c79476d1ba17d5c3 Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Tue, 17 Dec 2019 12:24:14 +0300 Subject: [PATCH] FIR: fix test data after Make 'statics visible from nested classes' --- .../testData/resolve/enumWithCompanion.txt | 22 ++++++++----------- ...aluesValueOfAndEntriesAccessibility.fir.kt | 6 ++--- .../objects/kt21515/staticsFromJavaNew.fir.kt | 6 ++--- .../objects/kt21515/staticsFromJavaOld.fir.kt | 6 ++--- ...StaticMembersOfParentClassJKJ_after.fir.kt | 16 +++++++------- ...taticMembersOfParentClassJKJ_before.fir.kt | 16 +++++++------- ...sToStaticMembersOfParentClass_after.fir.kt | 10 ++++----- ...ToStaticMembersOfParentClass_before.fir.kt | 10 ++++----- .../inheritFromContainingClass_after.fir.kt | 2 +- .../inheritFromContainingClass_before.fir.kt | 2 +- .../inheritFromJavaAfterKotlin_after.fir.kt | 6 ++--- .../inheritFromJavaAfterKotlin_before.fir.kt | 6 ++--- .../inheritFromJava_after.fir.kt | 6 ++--- .../inheritFromJava_before.fir.kt | 6 ++--- .../inheritance/statics/staticVsMember.fir.kt | 4 ++-- 15 files changed, 60 insertions(+), 64 deletions(-) diff --git a/compiler/fir/resolve/testData/resolve/enumWithCompanion.txt b/compiler/fir/resolve/testData/resolve/enumWithCompanion.txt index 5ef31d3cc57..6d631b9347d 100644 --- a/compiler/fir/resolve/testData/resolve/enumWithCompanion.txt +++ b/compiler/fir/resolve/testData/resolve/enumWithCompanion.txt @@ -1,27 +1,23 @@ FILE: enumWithCompanion.kt public final enum class EC : R|kotlin/Enum| { private constructor(): R|EC| { - super|>() + super() } - public final static val A: R|EC| = object : R|EC| { - private constructor(): R|EC| { - super() + public final enum entry A : R|kotlin/Any| { + public constructor(): R|EC.A| { + super() } } - - - public final static val B: R|EC| = object : R|EC| { - private constructor(): R|EC| { - super() + public final enum entry B : R|kotlin/Any| { + public constructor(): R|EC.B| { + super() } } - - public final companion object Companion : R|kotlin/Any| { private constructor(): R|EC.Companion| { super() @@ -29,10 +25,10 @@ FILE: enumWithCompanion.kt public final fun u(ec: R|EC|): R|kotlin/Boolean| { ^u when (R|/ec|) { - ==($subj$, R|/EC.A|) -> { + ==($subj$, Q|EC.A|) -> { Boolean(true) } - ==($subj$, R|/EC.B|) -> { + ==($subj$, Q|EC.B|) -> { Boolean(false) } } diff --git a/compiler/testData/diagnostics/tests/enum/valuesValueOfAndEntriesAccessibility.fir.kt b/compiler/testData/diagnostics/tests/enum/valuesValueOfAndEntriesAccessibility.fir.kt index c023e705a4a..b3580c5fac2 100644 --- a/compiler/testData/diagnostics/tests/enum/valuesValueOfAndEntriesAccessibility.fir.kt +++ b/compiler/testData/diagnostics/tests/enum/valuesValueOfAndEntriesAccessibility.fir.kt @@ -3,9 +3,9 @@ enum class E { companion object { fun foo(): E = ENTRY - fun bar(): Array = values() - fun baz(): E = valueOf("ENTRY") - val valuez = values() + fun bar(): Array = values() + fun baz(): E = valueOf("ENTRY") + val valuez = values() } fun oof(): E = ENTRY diff --git a/compiler/testData/diagnostics/tests/objects/kt21515/staticsFromJavaNew.fir.kt b/compiler/testData/diagnostics/tests/objects/kt21515/staticsFromJavaNew.fir.kt index 03695a19fb8..afc01878696 100644 --- a/compiler/testData/diagnostics/tests/objects/kt21515/staticsFromJavaNew.fir.kt +++ b/compiler/testData/diagnostics/tests/objects/kt21515/staticsFromJavaNew.fir.kt @@ -28,10 +28,10 @@ open class Base { class Derived : Base() { fun test(javaStaticInTypePosition: Classifier) { - method() - property + method() + property Classifier() - syntheticSam { } + syntheticSam { } // Instance members shouldn't be affected, but we check them, just in case val y = instanceSyntheticProperty diff --git a/compiler/testData/diagnostics/tests/objects/kt21515/staticsFromJavaOld.fir.kt b/compiler/testData/diagnostics/tests/objects/kt21515/staticsFromJavaOld.fir.kt index fcb485158b5..e7b795b7daf 100644 --- a/compiler/testData/diagnostics/tests/objects/kt21515/staticsFromJavaOld.fir.kt +++ b/compiler/testData/diagnostics/tests/objects/kt21515/staticsFromJavaOld.fir.kt @@ -28,10 +28,10 @@ open class Base { class Derived : Base() { fun test(javaStaticInTypePosition: Classifier) { - method() - property + method() + property Classifier() - syntheticSam { } + syntheticSam { } // Instance members shouldn't be affected, but we check them, just in case val y = instanceSyntheticProperty diff --git a/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/accessToStaticMembersOfParentClassJKJ_after.fir.kt b/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/accessToStaticMembersOfParentClassJKJ_after.fir.kt index 4e52edab6a9..591be05f5e9 100644 --- a/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/accessToStaticMembersOfParentClassJKJ_after.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/accessToStaticMembersOfParentClassJKJ_after.fir.kt @@ -18,36 +18,36 @@ open class A { class B : J2() { init { - foo() + foo() bar() boo() } fun test2() { - foo() + foo() bar() boo() } object O { fun test() { - foo() + foo() bar() - boo() + boo() } } companion object { init { - foo() + foo() bar() - boo() + boo() } fun test() { - foo() + foo() bar() - boo() + boo() } fun bar() {} diff --git a/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/accessToStaticMembersOfParentClassJKJ_before.fir.kt b/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/accessToStaticMembersOfParentClassJKJ_before.fir.kt index ebf633574e0..3e2488e6972 100644 --- a/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/accessToStaticMembersOfParentClassJKJ_before.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/accessToStaticMembersOfParentClassJKJ_before.fir.kt @@ -18,36 +18,36 @@ open class A { class B : J2() { init { - foo() + foo() bar() boo() } fun test2() { - foo() + foo() bar() boo() } object O { fun test() { - foo() + foo() bar() - boo() + boo() } } companion object { init { - foo() + foo() bar() - boo() + boo() } fun test() { - foo() + foo() bar() - boo() + boo() } fun bar() {} diff --git a/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/accessToStaticMembersOfParentClass_after.fir.kt b/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/accessToStaticMembersOfParentClass_after.fir.kt index aa556c2c09a..4718feab9d3 100644 --- a/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/accessToStaticMembersOfParentClass_after.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/accessToStaticMembersOfParentClass_after.fir.kt @@ -13,30 +13,30 @@ open class A { class B : A() { init { - foo() + foo() bar() } fun test2() { - foo() + foo() bar() } object O { fun test() { - foo() + foo() bar() } } companion object { init { - foo() + foo() bar() } fun test() { - foo() + foo() bar() } diff --git a/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/accessToStaticMembersOfParentClass_before.fir.kt b/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/accessToStaticMembersOfParentClass_before.fir.kt index 28daf2d8470..5098fb3449a 100644 --- a/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/accessToStaticMembersOfParentClass_before.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/accessToStaticMembersOfParentClass_before.fir.kt @@ -13,30 +13,30 @@ open class A { class B : A() { init { - foo() + foo() bar() } fun test2() { - foo() + foo() bar() } object O { fun test() { - foo() + foo() bar() } } companion object { init { - foo() + foo() bar() } fun test() { - foo() + foo() bar() } diff --git a/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromContainingClass_after.fir.kt b/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromContainingClass_after.fir.kt index 0df97ac7ee2..575ff4d1e43 100644 --- a/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromContainingClass_after.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromContainingClass_after.fir.kt @@ -27,7 +27,7 @@ open class A : J() { object O { fun test() { - foo() + foo() bar() val a: Int = baz() val b: T = baz() diff --git a/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromContainingClass_before.fir.kt b/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromContainingClass_before.fir.kt index 1f60f0f8568..940af0e53d3 100644 --- a/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromContainingClass_before.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromContainingClass_before.fir.kt @@ -27,7 +27,7 @@ open class A : J() { object O { fun test() { - foo() + foo() bar() val a: Int = baz() val b: T = baz() diff --git a/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromJavaAfterKotlin_after.fir.kt b/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromJavaAfterKotlin_after.fir.kt index d7a1bdd320f..29a98ff0b90 100644 --- a/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromJavaAfterKotlin_after.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromJavaAfterKotlin_after.fir.kt @@ -12,20 +12,20 @@ open class B : J() { class A { init { - foo() + foo() bar() baz() } fun test1() { - foo() + foo() bar() baz() } object O { fun test() { - foo() + foo() bar() baz() } diff --git a/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromJavaAfterKotlin_before.fir.kt b/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromJavaAfterKotlin_before.fir.kt index 79bd44e5627..aee0230f1bd 100644 --- a/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromJavaAfterKotlin_before.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromJavaAfterKotlin_before.fir.kt @@ -12,20 +12,20 @@ open class B : J() { class A { init { - foo() + foo() bar() baz() } fun test1() { - foo() + foo() bar() baz() } object O { fun test() { - foo() + foo() bar() baz() } diff --git a/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromJava_after.fir.kt b/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromJava_after.fir.kt index 2abf7f10610..cebcc3677e5 100644 --- a/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromJava_after.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromJava_after.fir.kt @@ -7,18 +7,18 @@ public class J { // FILE: test.kt class A { init { - foo() + foo() bar() } fun test1() { - foo() + foo() bar() } object O { fun test() { - foo() + foo() bar() } } diff --git a/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromJava_before.fir.kt b/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromJava_before.fir.kt index 2e585f6aa21..63a5a2660e8 100644 --- a/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromJava_before.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromJava_before.fir.kt @@ -7,18 +7,18 @@ public class J { // FILE: test.kt class A { init { - foo() + foo() bar() } fun test1() { - foo() + foo() bar() } object O { fun test() { - foo() + foo() bar() } } diff --git a/compiler/testData/diagnostics/tests/scopes/inheritance/statics/staticVsMember.fir.kt b/compiler/testData/diagnostics/tests/scopes/inheritance/statics/staticVsMember.fir.kt index bf858b10100..9db4a94b46d 100644 --- a/compiler/testData/diagnostics/tests/scopes/inheritance/statics/staticVsMember.fir.kt +++ b/compiler/testData/diagnostics/tests/scopes/inheritance/statics/staticVsMember.fir.kt @@ -10,8 +10,8 @@ public class A { class B: A() { companion object { init { - val a: Int = foo() - val b: Int = bar + val a: Int = foo() + val b: Int = bar } }