Skip to content

Commit 8b89b5e

Browse files
cypressiousliamoberg
authored andcommitted
[Tests] Convert MPP test from context receivers to context parameters
#KT-72994
1 parent ba3b185 commit 8b89b5e

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

compiler/testData/diagnostics/tests/multiplatform/actualClassifierMustHasTheSameMembersAsNonFinalExpectClassifierChecker/changeClassTypeParameterNames.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
// RUN_PIPELINE_TILL: BACKEND
2-
// DIAGNOSTICS: -CONTEXT_RECEIVERS_DEPRECATED
32
// FIR_IDENTICAL
4-
// LANGUAGE: +ContextReceivers
3+
// LANGUAGE: +ContextParameters
54
// MODULE: m1-common
65
// FILE: common.kt
76

87
open class Base<T> {
98
open fun returnType(): T = null!!
109
open fun parameterType(t: T) {}
11-
context(T)
10+
context(_: T)
1211
open fun contextReceiverType() {}
1312
open fun T.extensionReceiverType() {}
1413
}
@@ -21,7 +20,7 @@ expect open class Foo<E> : Base<E>
2120
actual open class Foo<R> : Base<R>() {
2221
override fun returnType(): R = null!!
2322
override fun parameterType(t: R) {}
24-
context(R)
23+
context(_: R)
2524
override fun contextReceiverType() {}
2625
override fun R.extensionReceiverType() {}
2726
}

compiler/testData/diagnostics/tests/multiplatform/actualClassifierMustHasTheSameMembersAsNonFinalExpectClassifierChecker/injectContextReceiverOverload.fir.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// RUN_PIPELINE_TILL: BACKEND
2-
// DIAGNOSTICS: -CONTEXT_RECEIVERS_DEPRECATED
3-
// LANGUAGE: +ContextReceivers
2+
// LANGUAGE: +ContextParameters
43
// ISSUE: KT-61447
54
// MODULE: m1-common
65
// FILE: common.kt
@@ -15,7 +14,7 @@ expect open class Foo {
1514
actual open class Foo {
1615
actual fun foo() {}
1716

18-
context(Int)
17+
context(_: Int)
1918
fun foo() {}
2019
}
2120

compiler/testData/diagnostics/tests/multiplatform/actualClassifierMustHasTheSameMembersAsNonFinalExpectClassifierChecker/injectContextReceiverOverload.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// RUN_PIPELINE_TILL: BACKEND
2-
// DIAGNOSTICS: -CONTEXT_RECEIVERS_DEPRECATED
3-
// LANGUAGE: +ContextReceivers
2+
// LANGUAGE: +ContextParameters
43
// ISSUE: KT-61447
54
// MODULE: m1-common
65
// FILE: common.kt
@@ -15,7 +14,7 @@ expect open class Foo {
1514
actual open class Foo {
1615
actual fun foo() {}
1716

18-
context(Int)
17+
context(_: Int)
1918
fun <!ACTUAL_MISSING!>foo<!>() {}
2019
}
2120

0 commit comments

Comments
 (0)