From f9e636546110e6dc285be01c8eb2a98f078df70b Mon Sep 17 00:00:00 2001 From: Anastasiya Shadrina Date: Mon, 26 Jul 2021 20:59:49 +0700 Subject: [PATCH] [Tests] Make build green again --- .../contextAndExtensionSameName.kt | 1 - .../contextReceivers/ambiguityInGroup.fir.kt | 8 ++++---- .../extensions/contextReceivers/lazy.fir.kt | 20 +++++++++---------- .../contextReceivers/localDeclaration.fir.kt | 4 ++-- .../contextReceivers/syntaxError.fir.kt | 3 --- .../contextReceivers/syntaxError.kt | 1 + .../thisIdentifierInfo.fir.kt | 2 +- .../thisWithCustomLabel.fir.kt | 8 ++++---- .../thisWithReceiverLabelsFunctions.fir.kt | 4 ++-- .../thisWithReceiverLabelsProperties.fir.kt | 10 +++++----- .../contextReceivers/typeParameterized.fir.kt | 2 +- 11 files changed, 30 insertions(+), 33 deletions(-) delete mode 100644 compiler/testData/diagnostics/tests/extensions/contextReceivers/syntaxError.fir.kt diff --git a/compiler/testData/codegen/box/extensionFunctions/contextReceivers/contextAndExtensionSameName.kt b/compiler/testData/codegen/box/extensionFunctions/contextReceivers/contextAndExtensionSameName.kt index b72e3368a9b..4556b7e680b 100644 --- a/compiler/testData/codegen/box/extensionFunctions/contextReceivers/contextAndExtensionSameName.kt +++ b/compiler/testData/codegen/box/extensionFunctions/contextReceivers/contextAndExtensionSameName.kt @@ -1,5 +1,4 @@ // TARGET_BACKEND: JVM_IR -// IGNORE_BACKEND_FIR: JVM_IR class A { val ok = "OK" diff --git a/compiler/testData/diagnostics/tests/extensions/contextReceivers/ambiguityInGroup.fir.kt b/compiler/testData/diagnostics/tests/extensions/contextReceivers/ambiguityInGroup.fir.kt index f0aebe8fd7a..b0030b12c7c 100644 --- a/compiler/testData/diagnostics/tests/extensions/contextReceivers/ambiguityInGroup.fir.kt +++ b/compiler/testData/diagnostics/tests/extensions/contextReceivers/ambiguityInGroup.fir.kt @@ -17,9 +17,9 @@ fun supertypeContextual() {} context(C1, C2) fun test() { - supertypeMember() - member() - supertypeExtension() - supertypeExtensionGeneric() + supertypeMember() + member() + supertypeExtension() + supertypeExtensionGeneric() supertypeContextual() } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/extensions/contextReceivers/lazy.fir.kt b/compiler/testData/diagnostics/tests/extensions/contextReceivers/lazy.fir.kt index 07456efbb33..72fb3faff08 100644 --- a/compiler/testData/diagnostics/tests/extensions/contextReceivers/lazy.fir.kt +++ b/compiler/testData/diagnostics/tests/extensions/contextReceivers/lazy.fir.kt @@ -13,36 +13,36 @@ fun f(lazy1: Lazy, lazy2: Lazy, lazyT: Lazy, lazyLazyT with(lazy1) { with(lazy2) { test1() - test2() - test3() + test2() + test3() } } with(lazy2) { with(lazy1) { test1() - test2() - test3() + test2() + test3() } } with(lazyT) { with(lazy1) { test1() - test2() - test3() + test2() + test3() } } with(lazyLazyT) { with(lazy1) { test1() - test2() - test3() + test2() + test3() } } with(lazy1) { with(lazyLazyT) { test1() - test2() - test3() + test2() + test3() } } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/extensions/contextReceivers/localDeclaration.fir.kt b/compiler/testData/diagnostics/tests/extensions/contextReceivers/localDeclaration.fir.kt index 24211a331bf..babf9028a87 100644 --- a/compiler/testData/diagnostics/tests/extensions/contextReceivers/localDeclaration.fir.kt +++ b/compiler/testData/diagnostics/tests/extensions/contextReceivers/localDeclaration.fir.kt @@ -6,7 +6,7 @@ class B : A fun testLocalFunction() { context(A) fun local() { - f() + f() } with(B()) { local() @@ -18,7 +18,7 @@ fun testLocalClass() { context(A) class Local { fun local() { - f() + f() } } with(B()) { diff --git a/compiler/testData/diagnostics/tests/extensions/contextReceivers/syntaxError.fir.kt b/compiler/testData/diagnostics/tests/extensions/contextReceivers/syntaxError.fir.kt deleted file mode 100644 index 95effbad181..00000000000 --- a/compiler/testData/diagnostics/tests/extensions/contextReceivers/syntaxError.fir.kt +++ /dev/null @@ -1,3 +0,0 @@ -context( -fun foo() { -} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/extensions/contextReceivers/syntaxError.kt b/compiler/testData/diagnostics/tests/extensions/contextReceivers/syntaxError.kt index 95effbad181..530b05d5f04 100644 --- a/compiler/testData/diagnostics/tests/extensions/contextReceivers/syntaxError.kt +++ b/compiler/testData/diagnostics/tests/extensions/contextReceivers/syntaxError.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL context( fun foo() { } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/extensions/contextReceivers/thisIdentifierInfo.fir.kt b/compiler/testData/diagnostics/tests/extensions/contextReceivers/thisIdentifierInfo.fir.kt index c68401f13c1..b65f8b5d7d1 100644 --- a/compiler/testData/diagnostics/tests/extensions/contextReceivers/thisIdentifierInfo.fir.kt +++ b/compiler/testData/diagnostics/tests/extensions/contextReceivers/thisIdentifierInfo.fir.kt @@ -2,5 +2,5 @@ class A(val a: String?) context(A) fun f() { if (this@A.a == null) return - this@A.a.length + this@A.a.length } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/extensions/contextReceivers/thisWithCustomLabel.fir.kt b/compiler/testData/diagnostics/tests/extensions/contextReceivers/thisWithCustomLabel.fir.kt index 99a3ba6a292..15f6f7123ad 100644 --- a/compiler/testData/diagnostics/tests/extensions/contextReceivers/thisWithCustomLabel.fir.kt +++ b/compiler/testData/diagnostics/tests/extensions/contextReceivers/thisWithCustomLabel.fir.kt @@ -3,16 +3,16 @@ class B(val b: Any) class C(val c: Any) context(labelAInt@A, A, labelB@B) fun f() { - this@labelAInt.a.toFloat() - this@A.a.length + this@labelAInt.a.toFloat() + this@A.a.length this@labelB.b this@B } context(labelAInt@A, A, labelB@B) val C.p: Int get() { - this@labelAInt.a.toFloat() - this@A.a.length + this@labelAInt.a.toFloat() + this@A.a.length this@B this@labelB.b this@C.c diff --git a/compiler/testData/diagnostics/tests/extensions/contextReceivers/thisWithReceiverLabelsFunctions.fir.kt b/compiler/testData/diagnostics/tests/extensions/contextReceivers/thisWithReceiverLabelsFunctions.fir.kt index 7981a5b3b49..85d27af256b 100644 --- a/compiler/testData/diagnostics/tests/extensions/contextReceivers/thisWithReceiverLabelsFunctions.fir.kt +++ b/compiler/testData/diagnostics/tests/extensions/contextReceivers/thisWithReceiverLabelsFunctions.fir.kt @@ -3,13 +3,13 @@ class B(val b: Any) class C(val c: Any) context(A, A, B) fun f() { - this@A.a.length + this@A.a.length this@B.b this } context(A, A, B) fun C.f() { - this@A.a.length + this@A.a.length this@B.b this@C.c this@f.c diff --git a/compiler/testData/diagnostics/tests/extensions/contextReceivers/thisWithReceiverLabelsProperties.fir.kt b/compiler/testData/diagnostics/tests/extensions/contextReceivers/thisWithReceiverLabelsProperties.fir.kt index 6276c3a145e..1322f1b4559 100644 --- a/compiler/testData/diagnostics/tests/extensions/contextReceivers/thisWithReceiverLabelsProperties.fir.kt +++ b/compiler/testData/diagnostics/tests/extensions/contextReceivers/thisWithReceiverLabelsProperties.fir.kt @@ -2,16 +2,16 @@ class A(val a: T) class B(val b: Any) class C(val c: Any) -context(A, A, B) var p: Int +context(A, A, B) var p: Int get() { - this@A.a.toDouble() - this@A.a.length + this@A.a.toDouble() + this@A.a.length this@B.b this return 1 } set(value) { - this@A.a.length + this@A.a.length this@B.b this field = value @@ -19,7 +19,7 @@ context(A, A, B) var p: Int context(A, A, B) val C.p: Int get() { - this@A.a.length + this@A.a.length this@B.b this@C.c this@p.c diff --git a/compiler/testData/diagnostics/tests/extensions/contextReceivers/typeParameterized.fir.kt b/compiler/testData/diagnostics/tests/extensions/contextReceivers/typeParameterized.fir.kt index 56b7826bcea..62b1f812bf7 100644 --- a/compiler/testData/diagnostics/tests/extensions/contextReceivers/typeParameterized.fir.kt +++ b/compiler/testData/diagnostics/tests/extensions/contextReceivers/typeParameterized.fir.kt @@ -7,5 +7,5 @@ context(T) fun T.f(t: B) {} fun Int.main(a: A, b: B) { - a.f(b) + a.f(b) } \ No newline at end of file