diff --git a/compiler/testData/codegen/box/coroutines/await.kt b/compiler/testData/codegen/box/coroutines/await.kt index 33e444197b5..91c3fcb390e 100644 --- a/compiler/testData/codegen/box/coroutines/await.kt +++ b/compiler/testData/codegen/box/coroutines/await.kt @@ -73,7 +73,7 @@ suspend fun awaitAndLog(value: Promise): S { }) } -fun async(c: @Suspend() (() -> T)): Promise { +fun async(c: suspend () -> T): Promise { return Promise { resolve -> c.startCoroutine(handleResultContinuation(resolve)) } diff --git a/compiler/testData/codegen/box/coroutines/beginWithException.kt b/compiler/testData/codegen/box/coroutines/beginWithException.kt index 7c1935e02f5..4a8e5e5e278 100644 --- a/compiler/testData/codegen/box/coroutines/beginWithException.kt +++ b/compiler/testData/codegen/box/coroutines/beginWithException.kt @@ -3,7 +3,7 @@ suspend fun suspendHere(): Any = suspendWithCurrentContinuation { x -> } -fun builder(c: @Suspend() (() -> Unit)) { +fun builder(c: suspend () -> Unit) { var exception: Throwable? = null c.createCoroutine(object : Continuation { diff --git a/compiler/testData/codegen/box/coroutines/beginWithExceptionNoHandleException.kt b/compiler/testData/codegen/box/coroutines/beginWithExceptionNoHandleException.kt index 52a58dfe3e6..99d469f161a 100644 --- a/compiler/testData/codegen/box/coroutines/beginWithExceptionNoHandleException.kt +++ b/compiler/testData/codegen/box/coroutines/beginWithExceptionNoHandleException.kt @@ -2,7 +2,7 @@ // WITH_COROUTINES suspend fun suspendHere(): Any = suspendWithCurrentContinuation { x ->} -fun builder(c: @Suspend() (() -> Unit)) { +fun builder(c: suspend () -> Unit) { try { c.createCoroutine(EmptyContinuation).resumeWithException(RuntimeException("OK")) } diff --git a/compiler/testData/codegen/box/coroutines/coercionToUnit.kt b/compiler/testData/codegen/box/coroutines/coercionToUnit.kt index 39544ed70f6..b2359d46de0 100644 --- a/compiler/testData/codegen/box/coroutines/coercionToUnit.kt +++ b/compiler/testData/codegen/box/coroutines/coercionToUnit.kt @@ -6,7 +6,7 @@ suspend fun await(t: T): T = suspendWithCurrentContinuation { c -> SUSPENDED } -fun builder(c: @Suspend() (() -> Unit)): String { +fun builder(c: suspend () -> Unit): String { var result = "fail" c.startCoroutine(handleResultContinuation { result = "OK" diff --git a/compiler/testData/codegen/box/coroutines/controlFlow/breakFinally.kt b/compiler/testData/codegen/box/coroutines/controlFlow/breakFinally.kt index e15b7429d06..08c92e28a7b 100644 --- a/compiler/testData/codegen/box/coroutines/controlFlow/breakFinally.kt +++ b/compiler/testData/codegen/box/coroutines/controlFlow/breakFinally.kt @@ -10,7 +10,7 @@ class Controller { } } -fun builder(c: @Suspend() (Controller.() -> Unit)): String { +fun builder(c: suspend Controller.() -> Unit): String { val controller = Controller() c.startCoroutine(controller, EmptyContinuation) return controller.result diff --git a/compiler/testData/codegen/box/coroutines/controlFlow/breakStatement.kt b/compiler/testData/codegen/box/coroutines/controlFlow/breakStatement.kt index 24dcf7c4c88..ede4518c044 100644 --- a/compiler/testData/codegen/box/coroutines/controlFlow/breakStatement.kt +++ b/compiler/testData/codegen/box/coroutines/controlFlow/breakStatement.kt @@ -10,7 +10,7 @@ class Controller { } } -fun builder(c: @Suspend() (Controller.() -> Unit)): String { +fun builder(c: suspend Controller.() -> Unit): String { val controller = Controller() c.startCoroutine(controller, EmptyContinuation) return controller.result diff --git a/compiler/testData/codegen/box/coroutines/controlFlow/doWhileStatement.kt b/compiler/testData/codegen/box/coroutines/controlFlow/doWhileStatement.kt index f358a1d2d0b..f919476b046 100644 --- a/compiler/testData/codegen/box/coroutines/controlFlow/doWhileStatement.kt +++ b/compiler/testData/codegen/box/coroutines/controlFlow/doWhileStatement.kt @@ -10,7 +10,7 @@ class Controller { } } -fun builder(c: @Suspend() (Controller.() -> Unit)): String { +fun builder(c: suspend Controller.() -> Unit): String { val controller = Controller() c.startCoroutine(controller, EmptyContinuation) return controller.result diff --git a/compiler/testData/codegen/box/coroutines/controlFlow/forContinue.kt b/compiler/testData/codegen/box/coroutines/controlFlow/forContinue.kt index 7da06c3032d..0906f80227e 100644 --- a/compiler/testData/codegen/box/coroutines/controlFlow/forContinue.kt +++ b/compiler/testData/codegen/box/coroutines/controlFlow/forContinue.kt @@ -10,7 +10,7 @@ class Controller { } } -fun builder(c: @Suspend() (Controller.() -> Unit)): String { +fun builder(c: suspend Controller.() -> Unit): String { val controller = Controller() c.startCoroutine(controller, EmptyContinuation) return controller.result diff --git a/compiler/testData/codegen/box/coroutines/controlFlow/forStatement.kt b/compiler/testData/codegen/box/coroutines/controlFlow/forStatement.kt index fb5cfe6232d..f2bac094be3 100644 --- a/compiler/testData/codegen/box/coroutines/controlFlow/forStatement.kt +++ b/compiler/testData/codegen/box/coroutines/controlFlow/forStatement.kt @@ -10,7 +10,7 @@ class Controller { } } -fun builder(c: @Suspend() (Controller.() -> Unit)): String { +fun builder(c: suspend Controller.() -> Unit): String { val controller = Controller() c.startCoroutine(controller, EmptyContinuation) return controller.result diff --git a/compiler/testData/codegen/box/coroutines/controlFlow/ifStatement.kt b/compiler/testData/codegen/box/coroutines/controlFlow/ifStatement.kt index 798045ef034..f00cabe115b 100644 --- a/compiler/testData/codegen/box/coroutines/controlFlow/ifStatement.kt +++ b/compiler/testData/codegen/box/coroutines/controlFlow/ifStatement.kt @@ -10,7 +10,7 @@ class Controller { } } -fun builder(c: @Suspend() (Controller.() -> Unit)): String { +fun builder(c: suspend Controller.() -> Unit): String { val controller = Controller() c.startCoroutine(controller, EmptyContinuation) return controller.result diff --git a/compiler/testData/codegen/box/coroutines/controlFlow/switchLikeWhen.kt b/compiler/testData/codegen/box/coroutines/controlFlow/switchLikeWhen.kt index 8403e00fa77..468c4330977 100644 --- a/compiler/testData/codegen/box/coroutines/controlFlow/switchLikeWhen.kt +++ b/compiler/testData/codegen/box/coroutines/controlFlow/switchLikeWhen.kt @@ -11,7 +11,7 @@ class Controller { } } -fun builder(c: @Suspend() (Controller.() -> Unit)): String { +fun builder(c: suspend Controller.() -> Unit): String { val controller = Controller() c.startCoroutine(controller, EmptyContinuation) return controller.result diff --git a/compiler/testData/codegen/box/coroutines/controlFlow/throwFromCatch.kt b/compiler/testData/codegen/box/coroutines/controlFlow/throwFromCatch.kt index c074286bc38..41ba24471b9 100644 --- a/compiler/testData/codegen/box/coroutines/controlFlow/throwFromCatch.kt +++ b/compiler/testData/codegen/box/coroutines/controlFlow/throwFromCatch.kt @@ -18,7 +18,7 @@ class Controller { } } -fun builder(c: @Suspend() (Controller.() -> Unit)): String { +fun builder(c: suspend Controller.() -> Unit): String { val controller = Controller() c.startCoroutine(controller, object : Continuation { override fun resume(data: Unit) { diff --git a/compiler/testData/codegen/box/coroutines/controlFlow/throwInTryWithHandleResult.kt b/compiler/testData/codegen/box/coroutines/controlFlow/throwInTryWithHandleResult.kt index 39f808e720e..64ce60d984d 100644 --- a/compiler/testData/codegen/box/coroutines/controlFlow/throwInTryWithHandleResult.kt +++ b/compiler/testData/codegen/box/coroutines/controlFlow/throwInTryWithHandleResult.kt @@ -11,7 +11,7 @@ class Controller { } } -fun builder(c: @Suspend() (Controller.() -> Unit)): String { +fun builder(c: suspend Controller.() -> Unit): String { val controller = Controller() c.startCoroutine(controller, object : Continuation { override fun resume(data: Unit) {} diff --git a/compiler/testData/codegen/box/coroutines/controlFlow/whileStatement.kt b/compiler/testData/codegen/box/coroutines/controlFlow/whileStatement.kt index 26a82f6ea00..dc16288e13a 100644 --- a/compiler/testData/codegen/box/coroutines/controlFlow/whileStatement.kt +++ b/compiler/testData/codegen/box/coroutines/controlFlow/whileStatement.kt @@ -10,7 +10,7 @@ class Controller { } } -fun builder(c: @Suspend() (Controller.() -> Unit)): String { +fun builder(c: suspend Controller.() -> Unit): String { val controller = Controller() c.startCoroutine(controller, EmptyContinuation) return controller.result diff --git a/compiler/testData/codegen/box/coroutines/controllerAccessFromInnerLambda.kt b/compiler/testData/codegen/box/coroutines/controllerAccessFromInnerLambda.kt index f97401fcb0c..f800577a1f5 100644 --- a/compiler/testData/codegen/box/coroutines/controllerAccessFromInnerLambda.kt +++ b/compiler/testData/codegen/box/coroutines/controllerAccessFromInnerLambda.kt @@ -14,7 +14,7 @@ class Controller { // INTERCEPT_RESUME_PLACEHOLDER } -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { val controller = Controller() c.startCoroutine(controller, EmptyContinuation) if (!controller.result) throw RuntimeException("fail") diff --git a/compiler/testData/codegen/box/coroutines/defaultParametersInSuspend.kt b/compiler/testData/codegen/box/coroutines/defaultParametersInSuspend.kt index b084ed58a18..b03ba5cfad2 100644 --- a/compiler/testData/codegen/box/coroutines/defaultParametersInSuspend.kt +++ b/compiler/testData/codegen/box/coroutines/defaultParametersInSuspend.kt @@ -9,7 +9,7 @@ class Controller { // INTERCEPT_RESUME_PLACEHOLDER } -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { c.startCoroutine(Controller(), EmptyContinuation) } diff --git a/compiler/testData/codegen/box/coroutines/emptyClosure.kt b/compiler/testData/codegen/box/coroutines/emptyClosure.kt index 7d61cb6f2ca..dbff2ec7163 100644 --- a/compiler/testData/codegen/box/coroutines/emptyClosure.kt +++ b/compiler/testData/codegen/box/coroutines/emptyClosure.kt @@ -13,7 +13,7 @@ class Controller { } -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { c.startCoroutine(Controller(), EmptyContinuation) } diff --git a/compiler/testData/codegen/box/coroutines/falseUnitCoercion.kt b/compiler/testData/codegen/box/coroutines/falseUnitCoercion.kt index 9c0a54790eb..df2c7dc1014 100644 --- a/compiler/testData/codegen/box/coroutines/falseUnitCoercion.kt +++ b/compiler/testData/codegen/box/coroutines/falseUnitCoercion.kt @@ -9,7 +9,7 @@ class Controller { // INTERCEPT_RESUME_PLACEHOLDER } -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { c.startCoroutine(Controller(), EmptyContinuation) } diff --git a/compiler/testData/codegen/box/coroutines/generate.kt b/compiler/testData/codegen/box/coroutines/generate.kt index a1a2a192be7..64b80d692e5 100644 --- a/compiler/testData/codegen/box/coroutines/generate.kt +++ b/compiler/testData/codegen/box/coroutines/generate.kt @@ -29,13 +29,13 @@ interface Generator { suspend fun yield(value: T) } -fun generate(block: @Suspend() (Generator.() -> Unit)): Sequence = GeneratedSequence(block) +fun generate(block: suspend Generator.() -> Unit): Sequence = GeneratedSequence(block) -class GeneratedSequence(private val block: @Suspend() (Generator.() -> Unit)) : Sequence { +class GeneratedSequence(private val block: suspend Generator.() -> Unit) : Sequence { override fun iterator(): Iterator = GeneratedIterator(block) } -class GeneratedIterator(block: @Suspend() (Generator.() -> Unit)) : AbstractIterator(), Generator { +class GeneratedIterator(block: suspend Generator.() -> Unit) : AbstractIterator(), Generator { private var nextStep: Continuation = block.createCoroutine(this, object : Continuation { override fun resume(data: Unit) { done() diff --git a/compiler/testData/codegen/box/coroutines/handleException.kt b/compiler/testData/codegen/box/coroutines/handleException.kt index 596d9077e2d..382290a0ac2 100644 --- a/compiler/testData/codegen/box/coroutines/handleException.kt +++ b/compiler/testData/codegen/box/coroutines/handleException.kt @@ -20,7 +20,7 @@ class Controller { SUSPENDED } - fun run(c: @Suspend() (Controller.() -> Unit)) { + fun run(c: suspend Controller.() -> Unit) { c.startCoroutine(this, handleExceptionContinuation { exception = it }) @@ -31,7 +31,7 @@ class Controller { } } -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { val controller = Controller() controller.run(c) diff --git a/compiler/testData/codegen/box/coroutines/handleResultCallEmptyBody.kt b/compiler/testData/codegen/box/coroutines/handleResultCallEmptyBody.kt index 45c8bad226d..ac2d4c3bdc5 100644 --- a/compiler/testData/codegen/box/coroutines/handleResultCallEmptyBody.kt +++ b/compiler/testData/codegen/box/coroutines/handleResultCallEmptyBody.kt @@ -1,7 +1,7 @@ // WITH_RUNTIME // WITH_COROUTINES -fun builder(c: @Suspend() (() -> Unit)): String { +fun builder(c: suspend () -> Unit): String { var ok = false c.startCoroutine(handleResultContinuation { ok = true diff --git a/compiler/testData/codegen/box/coroutines/handleResultNonUnitExpression.kt b/compiler/testData/codegen/box/coroutines/handleResultNonUnitExpression.kt index d78e88bdd0a..6d5f8f002a4 100644 --- a/compiler/testData/codegen/box/coroutines/handleResultNonUnitExpression.kt +++ b/compiler/testData/codegen/box/coroutines/handleResultNonUnitExpression.kt @@ -6,7 +6,7 @@ suspend fun suspendHere(): String = suspendWithCurrentContinuation { x -> SUSPENDED } -fun builder(c: @Suspend() (() -> Unit)) { +fun builder(c: suspend () -> Unit) { var isCompleted = false c.startCoroutine(handleResultContinuation { isCompleted = true diff --git a/compiler/testData/codegen/box/coroutines/handleResultSuspended.kt b/compiler/testData/codegen/box/coroutines/handleResultSuspended.kt index 405da7fb208..b9e33cd8ff5 100644 --- a/compiler/testData/codegen/box/coroutines/handleResultSuspended.kt +++ b/compiler/testData/codegen/box/coroutines/handleResultSuspended.kt @@ -10,7 +10,7 @@ class Controller { } } -fun builder(c: @Suspend() (Controller.() -> String)): String { +fun builder(c: suspend Controller.() -> String): String { val controller = Controller() c.startCoroutine(controller, handleResultContinuation { controller.log += "return($it);" diff --git a/compiler/testData/codegen/box/coroutines/illegalState.kt b/compiler/testData/codegen/box/coroutines/illegalState.kt index 6b8f652f953..5e19ca40252 100644 --- a/compiler/testData/codegen/box/coroutines/illegalState.kt +++ b/compiler/testData/codegen/box/coroutines/illegalState.kt @@ -7,11 +7,11 @@ suspend fun suspendHere(): Unit = suspendWithCurrentContinuation { x -> SUSPENDED } -fun builder1(c: @Suspend() (() -> Unit)) { +fun builder1(c: suspend () -> Unit) { (c as Continuation).resume(Unit) } -fun builder2(c: @Suspend() (() -> Unit)) { +fun builder2(c: suspend () -> Unit) { val continuation = c.createCoroutine(EmptyContinuation) val declaredField = continuation.javaClass.superclass.superclass.getDeclaredField("label") declaredField.setAccessible(true) diff --git a/compiler/testData/codegen/box/coroutines/inlineSuspendFunction.kt b/compiler/testData/codegen/box/coroutines/inlineSuspendFunction.kt index b769cdf58bf..345bed29fc4 100644 --- a/compiler/testData/codegen/box/coroutines/inlineSuspendFunction.kt +++ b/compiler/testData/codegen/box/coroutines/inlineSuspendFunction.kt @@ -21,7 +21,7 @@ class Controller { // INTERCEPT_RESUME_PLACEHOLDER } -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { c.startCoroutine(Controller(), EmptyContinuation) } diff --git a/compiler/testData/codegen/box/coroutines/inlinedTryCatchFinally.kt b/compiler/testData/codegen/box/coroutines/inlinedTryCatchFinally.kt index ef1386fd903..23deef85b1f 100644 --- a/compiler/testData/codegen/box/coroutines/inlinedTryCatchFinally.kt +++ b/compiler/testData/codegen/box/coroutines/inlinedTryCatchFinally.kt @@ -21,7 +21,7 @@ class Controller { SUSPENDED } - fun run(c: @Suspend() (Controller.() -> String)) { + fun run(c: suspend Controller.() -> String) { c.startCoroutine(this, handleResultContinuation { globalResult = it }) @@ -32,7 +32,7 @@ class Controller { } } -fun builder(expectException: Boolean = false, c: @Suspend() (Controller.() -> String)) { +fun builder(expectException: Boolean = false, c: suspend Controller.() -> String) { val controller = Controller() globalResult = "#" diff --git a/compiler/testData/codegen/box/coroutines/innerSuspensionCalls.kt b/compiler/testData/codegen/box/coroutines/innerSuspensionCalls.kt index 107c443f6ea..0279de5aa72 100644 --- a/compiler/testData/codegen/box/coroutines/innerSuspensionCalls.kt +++ b/compiler/testData/codegen/box/coroutines/innerSuspensionCalls.kt @@ -10,7 +10,7 @@ class Controller { // INTERCEPT_RESUME_PLACEHOLDER } -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { c.startCoroutine(Controller(), EmptyContinuation) } diff --git a/compiler/testData/codegen/box/coroutines/instanceOfContinuation.kt b/compiler/testData/codegen/box/coroutines/instanceOfContinuation.kt index c5c0f30a37c..dea5419cdc7 100644 --- a/compiler/testData/codegen/box/coroutines/instanceOfContinuation.kt +++ b/compiler/testData/codegen/box/coroutines/instanceOfContinuation.kt @@ -18,7 +18,7 @@ class Controller { // INTERCEPT_RESUME_PLACEHOLDER } -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { c.startCoroutine(Controller(), EmptyContinuation) } diff --git a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/complicatedMerge.kt b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/complicatedMerge.kt index 9f3d2aeef40..62945baabae 100644 --- a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/complicatedMerge.kt +++ b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/complicatedMerge.kt @@ -9,7 +9,7 @@ class Controller { // INTERCEPT_RESUME_PLACEHOLDER } -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { c.startCoroutine(Controller(), EmptyContinuation) } diff --git a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/i2bResult.kt b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/i2bResult.kt index 4cc60a2bc06..6dfee9e4e64 100644 --- a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/i2bResult.kt +++ b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/i2bResult.kt @@ -9,7 +9,7 @@ class Controller { // INTERCEPT_RESUME_PLACEHOLDER } -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { c.startCoroutine(Controller(), EmptyContinuation) } diff --git a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt index 3501a5f87f4..4385372b63b 100644 --- a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt +++ b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt @@ -9,7 +9,7 @@ class Controller { // INTERCEPT_RESUME_PLACEHOLDER } -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { c.startCoroutine(Controller(), EmptyContinuation) } diff --git a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromByteArray.kt b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromByteArray.kt index dab629a493c..042bf869862 100644 --- a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromByteArray.kt +++ b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromByteArray.kt @@ -9,7 +9,7 @@ class Controller { // INTERCEPT_RESUME_PLACEHOLDER } -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { c.startCoroutine(Controller(), EmptyContinuation) } diff --git a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/noVariableInTable.kt b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/noVariableInTable.kt index 96319e5c3cb..4314fde8ed9 100644 --- a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/noVariableInTable.kt +++ b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/noVariableInTable.kt @@ -9,7 +9,7 @@ class Controller { // INTERCEPT_RESUME_PLACEHOLDER } -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { c.startCoroutine(Controller(), EmptyContinuation) } diff --git a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt index ba05935c9c2..2d1f9025165 100644 --- a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt +++ b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt @@ -9,7 +9,7 @@ class Controller { // INTERCEPT_RESUME_PLACEHOLDER } -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { c.startCoroutine(Controller(), EmptyContinuation) } diff --git a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInArrayStore.kt b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInArrayStore.kt index 83fe4b3f71a..9420cd8e63a 100644 --- a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInArrayStore.kt +++ b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInArrayStore.kt @@ -10,7 +10,7 @@ class Controller { // INTERCEPT_RESUME_PLACEHOLDER } -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { c.startCoroutine(Controller(), EmptyContinuation) } diff --git a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInMethodCall.kt b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInMethodCall.kt index 64aa2b45655..0fc51683acf 100644 --- a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInMethodCall.kt +++ b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInMethodCall.kt @@ -9,7 +9,7 @@ class Controller { // INTERCEPT_RESUME_PLACEHOLDER } -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { c.startCoroutine(Controller(), EmptyContinuation) } diff --git a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInPutfield.kt b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInPutfield.kt index 756c1033c31..941a7aa9da9 100644 --- a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInPutfield.kt +++ b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInPutfield.kt @@ -10,7 +10,7 @@ class Controller { // INTERCEPT_RESUME_PLACEHOLDER } -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { c.startCoroutine(Controller(), EmptyContinuation) } diff --git a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInVarStore.kt b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInVarStore.kt index 2bf268fb84b..198f0e71ac6 100644 --- a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInVarStore.kt +++ b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInVarStore.kt @@ -9,7 +9,7 @@ class Controller { // INTERCEPT_RESUME_PLACEHOLDER } -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { c.startCoroutine(Controller(), EmptyContinuation) } diff --git a/compiler/testData/codegen/box/coroutines/interceptResume.kt b/compiler/testData/codegen/box/coroutines/interceptResume.kt index 592e3a7b559..ae1f6815695 100644 --- a/compiler/testData/codegen/box/coroutines/interceptResume.kt +++ b/compiler/testData/codegen/box/coroutines/interceptResume.kt @@ -19,7 +19,7 @@ class Controller { } } -fun test(c: @Suspend() (Controller.() -> Unit)): String { +fun test(c: suspend Controller.() -> Unit): String { val controller = Controller() c.startCoroutine(controller, EmptyContinuation, object: ResumeInterceptor { private fun interceptResume(block: () -> Unit) { diff --git a/compiler/testData/codegen/box/coroutines/iterateOverArray.kt b/compiler/testData/codegen/box/coroutines/iterateOverArray.kt index 1e81aa355d7..a7cfe751875 100644 --- a/compiler/testData/codegen/box/coroutines/iterateOverArray.kt +++ b/compiler/testData/codegen/box/coroutines/iterateOverArray.kt @@ -9,7 +9,7 @@ class Controller { // INTERCEPT_RESUME_PLACEHOLDER } -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { c.startCoroutine(Controller(), EmptyContinuation) } diff --git a/compiler/testData/codegen/box/coroutines/kt12958.kt b/compiler/testData/codegen/box/coroutines/kt12958.kt index c7c8ff7dd0d..36c51dba0f7 100644 --- a/compiler/testData/codegen/box/coroutines/kt12958.kt +++ b/compiler/testData/codegen/box/coroutines/kt12958.kt @@ -6,7 +6,7 @@ suspend fun suspendHere(v: V): V = suspendWithCurrentContinuation { x -> SUSPENDED } -fun builder(c: @Suspend() (() -> String)): String { +fun builder(c: suspend () -> String): String { var result = "fail" c.startCoroutine(handleResultContinuation { result = it diff --git a/compiler/testData/codegen/box/coroutines/lastExpressionIsLoop.kt b/compiler/testData/codegen/box/coroutines/lastExpressionIsLoop.kt index 50a814b15d4..03878f2e13c 100644 --- a/compiler/testData/codegen/box/coroutines/lastExpressionIsLoop.kt +++ b/compiler/testData/codegen/box/coroutines/lastExpressionIsLoop.kt @@ -10,7 +10,7 @@ class Controller { } } -fun builder(c: @Suspend() (Controller.() -> Unit)): String { +fun builder(c: suspend Controller.() -> Unit): String { val controller = Controller() c.startCoroutine(controller, handleResultContinuation { controller.ok = true diff --git a/compiler/testData/codegen/box/coroutines/lastStatementInc.kt b/compiler/testData/codegen/box/coroutines/lastStatementInc.kt index 342fbd5cf33..38071bc44ea 100644 --- a/compiler/testData/codegen/box/coroutines/lastStatementInc.kt +++ b/compiler/testData/codegen/box/coroutines/lastStatementInc.kt @@ -5,7 +5,7 @@ suspend fun suspendHere(): String = suspendWithCurrentContinuation { x -> SUSPENDED } -fun builder(c: @Suspend() (() -> Unit)) { +fun builder(c: suspend () -> Unit) { var wasHandleResultCalled = false c.startCoroutine(handleResultContinuation { wasHandleResultCalled = true diff --git a/compiler/testData/codegen/box/coroutines/lastStementAssignment.kt b/compiler/testData/codegen/box/coroutines/lastStementAssignment.kt index 3077bf534f6..6cbcdc3544e 100644 --- a/compiler/testData/codegen/box/coroutines/lastStementAssignment.kt +++ b/compiler/testData/codegen/box/coroutines/lastStementAssignment.kt @@ -5,7 +5,7 @@ suspend fun suspendHere(): String = suspendWithCurrentContinuation { x -> SUSPENDED } -fun builder(c: @Suspend() (() -> Unit)) { +fun builder(c: suspend () -> Unit) { var wasHandleResultCalled = false c.startCoroutine(handleResultContinuation { wasHandleResultCalled = true diff --git a/compiler/testData/codegen/box/coroutines/lastUnitExpression.kt b/compiler/testData/codegen/box/coroutines/lastUnitExpression.kt index 0baaf48ddf5..577b5d7fbb1 100644 --- a/compiler/testData/codegen/box/coroutines/lastUnitExpression.kt +++ b/compiler/testData/codegen/box/coroutines/lastUnitExpression.kt @@ -10,7 +10,7 @@ class Controller { } } -fun builder(c: @Suspend() (Controller.() -> Unit)): String { +fun builder(c: suspend Controller.() -> Unit): String { val controller = Controller() c.startCoroutine(controller, handleResultContinuation { controller.ok = true diff --git a/compiler/testData/codegen/box/coroutines/multiModule/simple.kt b/compiler/testData/codegen/box/coroutines/multiModule/simple.kt index aff532263f2..68bd7df83be 100644 --- a/compiler/testData/codegen/box/coroutines/multiModule/simple.kt +++ b/compiler/testData/codegen/box/coroutines/multiModule/simple.kt @@ -17,7 +17,7 @@ class Controller { // FILE: main.kt import lib.* -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { c.startCoroutine(Controller(), EmptyContinuation) } diff --git a/compiler/testData/codegen/box/coroutines/multiModule/suspendExtension.kt b/compiler/testData/codegen/box/coroutines/multiModule/suspendExtension.kt index 70d781d0b63..47ac0f0f98e 100644 --- a/compiler/testData/codegen/box/coroutines/multiModule/suspendExtension.kt +++ b/compiler/testData/codegen/box/coroutines/multiModule/suspendExtension.kt @@ -28,7 +28,7 @@ suspend fun Controller.localSuspendExtension(v: String) = v.suspendHere() inline suspend fun Controller.localInlineSuspendExtension(v: String) = v.inlineSuspendHere() -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { c.startCoroutine(Controller(), EmptyContinuation) } diff --git a/compiler/testData/codegen/box/coroutines/multipleInvokeCalls.kt b/compiler/testData/codegen/box/coroutines/multipleInvokeCalls.kt index 932cf29e6e0..3fd3a9bcad8 100644 --- a/compiler/testData/codegen/box/coroutines/multipleInvokeCalls.kt +++ b/compiler/testData/codegen/box/coroutines/multipleInvokeCalls.kt @@ -18,7 +18,7 @@ class Controller { // INTERCEPT_RESUME_PLACEHOLDER } -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { val controller1 = Controller() val controller2 = Controller() diff --git a/compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda1.kt b/compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda1.kt index fd6c758e212..942573976bf 100644 --- a/compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda1.kt +++ b/compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda1.kt @@ -18,7 +18,7 @@ class Controller { // INTERCEPT_RESUME_PLACEHOLDER } -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { val controller1 = Controller() val controller2 = Controller() diff --git a/compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda2.kt b/compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda2.kt index ca53524524e..e4118bf2cae 100644 --- a/compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda2.kt +++ b/compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda2.kt @@ -18,7 +18,7 @@ class Controller { // INTERCEPT_RESUME_PLACEHOLDER } -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { val controller1 = Controller() val controller2 = Controller() diff --git a/compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda3.kt b/compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda3.kt index 08374f9d07a..9149d29c27b 100644 --- a/compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda3.kt +++ b/compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda3.kt @@ -18,7 +18,7 @@ class Controller { // INTERCEPT_RESUME_PLACEHOLDER } -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { val controller1 = Controller() val controller2 = Controller() diff --git a/compiler/testData/codegen/box/coroutines/nestedTryCatch.kt b/compiler/testData/codegen/box/coroutines/nestedTryCatch.kt index ba3cdd00acf..f95c0240e8e 100644 --- a/compiler/testData/codegen/box/coroutines/nestedTryCatch.kt +++ b/compiler/testData/codegen/box/coroutines/nestedTryCatch.kt @@ -21,7 +21,7 @@ class Controller { SUSPENDED } - fun run(c: @Suspend() (Controller.() -> String)) { + fun run(c: suspend Controller.() -> String) { c.startCoroutine(this, handleResultContinuation { globalResult = it }) @@ -34,7 +34,7 @@ class Controller { // INTERCEPT_RESUME_PLACEHOLDER } -fun builder(expectException: Boolean = false, c: @Suspend() (Controller.() -> String)) { +fun builder(expectException: Boolean = false, c: suspend Controller.() -> String) { val controller = Controller() globalResult = "#" diff --git a/compiler/testData/codegen/box/coroutines/noSuspensionPoints.kt b/compiler/testData/codegen/box/coroutines/noSuspensionPoints.kt index 252b3eb1dd0..1b42249c4df 100644 --- a/compiler/testData/codegen/box/coroutines/noSuspensionPoints.kt +++ b/compiler/testData/codegen/box/coroutines/noSuspensionPoints.kt @@ -1,7 +1,7 @@ // WITH_RUNTIME // WITH_COROUTINES -fun builder(c: @Suspend() (() -> Int)): Int { +fun builder(c: suspend () -> Int): Int { var res = 0 c.startCoroutine(handleResultContinuation { res = it diff --git a/compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambda.kt b/compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambda.kt index 0daed379a15..fb8e05feebf 100644 --- a/compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambda.kt +++ b/compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambda.kt @@ -8,7 +8,7 @@ class Controller { } } -fun builder(c: @Suspend() (Controller.() -> Int)): Controller { +fun builder(c: suspend Controller.() -> Int): Controller { val controller = Controller() c.startCoroutine(controller, handleResultContinuation { controller.cResult = it diff --git a/compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambdaDeep.kt b/compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambdaDeep.kt index 8c37614010e..962806af988 100644 --- a/compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambdaDeep.kt +++ b/compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambdaDeep.kt @@ -9,7 +9,7 @@ class Controller { } } -fun builder(c: @Suspend() (Controller.() -> Int)): Controller { +fun builder(c: suspend Controller.() -> Int): Controller { val controller = Controller() c.startCoroutine(controller, handleResultContinuation { controller.cResult = it diff --git a/compiler/testData/codegen/box/coroutines/returnByLabel.kt b/compiler/testData/codegen/box/coroutines/returnByLabel.kt index 1623632cfb8..8746d092401 100644 --- a/compiler/testData/codegen/box/coroutines/returnByLabel.kt +++ b/compiler/testData/codegen/box/coroutines/returnByLabel.kt @@ -5,7 +5,7 @@ suspend fun suspendHere(): String = suspendWithCurrentContinuation { x -> SUSPENDED } -fun builder(c: @Suspend() (() -> Int)): Int { +fun builder(c: suspend () -> Int): Int { var res = 0 c.startCoroutine(handleResultContinuation { res = it diff --git a/compiler/testData/codegen/box/coroutines/simple.kt b/compiler/testData/codegen/box/coroutines/simple.kt index 1471d33785c..8667ba72c21 100644 --- a/compiler/testData/codegen/box/coroutines/simple.kt +++ b/compiler/testData/codegen/box/coroutines/simple.kt @@ -7,7 +7,7 @@ suspend fun suspendHere(): String = suspendWithCurrentContinuation { x -> SUSPENDED } -fun builder(c: @Suspend() () -> Unit) { +fun builder(c: suspend () -> Unit) { c.startCoroutine(EmptyContinuation) } diff --git a/compiler/testData/codegen/box/coroutines/simpleException.kt b/compiler/testData/codegen/box/coroutines/simpleException.kt index e854c3ec223..c132a0087ef 100644 --- a/compiler/testData/codegen/box/coroutines/simpleException.kt +++ b/compiler/testData/codegen/box/coroutines/simpleException.kt @@ -9,7 +9,7 @@ class Controller { // INTERCEPT_RESUME_PLACEHOLDER } -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { c.startCoroutine(Controller(), EmptyContinuation) } diff --git a/compiler/testData/codegen/box/coroutines/simpleWithHandleResult.kt b/compiler/testData/codegen/box/coroutines/simpleWithHandleResult.kt index b7833c2f0e1..0263c388b8d 100644 --- a/compiler/testData/codegen/box/coroutines/simpleWithHandleResult.kt +++ b/compiler/testData/codegen/box/coroutines/simpleWithHandleResult.kt @@ -5,7 +5,7 @@ suspend fun suspendHere(): String = suspendWithCurrentContinuation { x -> SUSPENDED } -fun builder(c: @Suspend() () -> Int): Int { +fun builder(c: suspend () -> Int): Int { var res = 0 c.createCoroutine(object : Continuation { diff --git a/compiler/testData/codegen/box/coroutines/stackUnwinding/exception.kt b/compiler/testData/codegen/box/coroutines/stackUnwinding/exception.kt index c92aeb0692f..c5b87d0694a 100644 --- a/compiler/testData/codegen/box/coroutines/stackUnwinding/exception.kt +++ b/compiler/testData/codegen/box/coroutines/stackUnwinding/exception.kt @@ -6,7 +6,7 @@ class Controller { // INTERCEPT_RESUME_PLACEHOLDER } -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { c.startCoroutine(Controller(), EmptyContinuation) } diff --git a/compiler/testData/codegen/box/coroutines/stackUnwinding/inlineSuspendFunction.kt b/compiler/testData/codegen/box/coroutines/stackUnwinding/inlineSuspendFunction.kt index a6265b30eb0..a6aea10af7a 100644 --- a/compiler/testData/codegen/box/coroutines/stackUnwinding/inlineSuspendFunction.kt +++ b/compiler/testData/codegen/box/coroutines/stackUnwinding/inlineSuspendFunction.kt @@ -14,7 +14,7 @@ class Controller { // INTERCEPT_RESUME_PLACEHOLDER } -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { c.startCoroutine(Controller(), EmptyContinuation) } diff --git a/compiler/testData/codegen/box/coroutines/stackUnwinding/simple.kt b/compiler/testData/codegen/box/coroutines/stackUnwinding/simple.kt index 9a10acb0603..5ec046e3d22 100644 --- a/compiler/testData/codegen/box/coroutines/stackUnwinding/simple.kt +++ b/compiler/testData/codegen/box/coroutines/stackUnwinding/simple.kt @@ -6,7 +6,7 @@ class Controller { // INTERCEPT_RESUME_PLACEHOLDER } -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { c.startCoroutine(Controller(), EmptyContinuation) } diff --git a/compiler/testData/codegen/box/coroutines/stackUnwinding/suspendInCycle.kt b/compiler/testData/codegen/box/coroutines/stackUnwinding/suspendInCycle.kt index 35e46f55c65..24ede4c84c8 100644 --- a/compiler/testData/codegen/box/coroutines/stackUnwinding/suspendInCycle.kt +++ b/compiler/testData/codegen/box/coroutines/stackUnwinding/suspendInCycle.kt @@ -11,7 +11,7 @@ class Controller { // INTERCEPT_RESUME_PLACEHOLDER } -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { c.startCoroutine(Controller(), EmptyContinuation) } diff --git a/compiler/testData/codegen/box/coroutines/statementLikeLastExpression.kt b/compiler/testData/codegen/box/coroutines/statementLikeLastExpression.kt index 663591b3a6e..877aa1221d0 100644 --- a/compiler/testData/codegen/box/coroutines/statementLikeLastExpression.kt +++ b/compiler/testData/codegen/box/coroutines/statementLikeLastExpression.kt @@ -6,7 +6,7 @@ suspend fun suspendWithValue(v: String): String = suspendWithCurrentContinuation SUSPENDED } -fun builder(c: @Suspend() (() -> String)) { +fun builder(c: suspend () -> String) { c.startCoroutine(handleResultContinuation { globalResult = it }) diff --git a/compiler/testData/codegen/box/coroutines/suspendDelegation.kt b/compiler/testData/codegen/box/coroutines/suspendDelegation.kt index da6cf8cfad1..399c6c3d342 100644 --- a/compiler/testData/codegen/box/coroutines/suspendDelegation.kt +++ b/compiler/testData/codegen/box/coroutines/suspendDelegation.kt @@ -11,7 +11,7 @@ class Controller { // INTERCEPT_RESUME_PLACEHOLDER } -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { c.startCoroutine(Controller(), EmptyContinuation) } diff --git a/compiler/testData/codegen/box/coroutines/suspendExtension.kt b/compiler/testData/codegen/box/coroutines/suspendExtension.kt index aded3f16ba3..81b3c775a68 100644 --- a/compiler/testData/codegen/box/coroutines/suspendExtension.kt +++ b/compiler/testData/codegen/box/coroutines/suspendExtension.kt @@ -16,7 +16,7 @@ suspend fun Controller.suspendExtension(v: String): String = v.suspendHere() inline suspend fun Controller.inlineSuspendExtension(v: String): String = v.inlineSuspendHere() -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { c.startCoroutine(Controller(), EmptyContinuation) } diff --git a/compiler/testData/codegen/box/coroutines/suspendFromInlineLambda.kt b/compiler/testData/codegen/box/coroutines/suspendFromInlineLambda.kt index 4ff4124e9eb..10fbb6f4635 100644 --- a/compiler/testData/codegen/box/coroutines/suspendFromInlineLambda.kt +++ b/compiler/testData/codegen/box/coroutines/suspendFromInlineLambda.kt @@ -9,7 +9,7 @@ class Controller { // INTERCEPT_RESUME_PLACEHOLDER } -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { c.startCoroutine(Controller(), EmptyContinuation) } diff --git a/compiler/testData/codegen/box/coroutines/suspendInCycle.kt b/compiler/testData/codegen/box/coroutines/suspendInCycle.kt index a9b120d9a47..8b6d794d0e9 100644 --- a/compiler/testData/codegen/box/coroutines/suspendInCycle.kt +++ b/compiler/testData/codegen/box/coroutines/suspendInCycle.kt @@ -14,7 +14,7 @@ class Controller { // INTERCEPT_RESUME_PLACEHOLDER } -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { c.startCoroutine(Controller(), EmptyContinuation) } diff --git a/compiler/testData/codegen/box/coroutines/suspendInTheMiddleOfObjectConstruction.kt b/compiler/testData/codegen/box/coroutines/suspendInTheMiddleOfObjectConstruction.kt index ba4c388b85f..9797d49e50d 100644 --- a/compiler/testData/codegen/box/coroutines/suspendInTheMiddleOfObjectConstruction.kt +++ b/compiler/testData/codegen/box/coroutines/suspendInTheMiddleOfObjectConstruction.kt @@ -19,7 +19,7 @@ class Controller { // INTERCEPT_RESUME_PLACEHOLDER } -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { c.startCoroutine(Controller(), EmptyContinuation) } diff --git a/compiler/testData/codegen/box/coroutines/tryCatchFinallyWithHandleResult.kt b/compiler/testData/codegen/box/coroutines/tryCatchFinallyWithHandleResult.kt index 7c09b2f982b..1e317cfef90 100644 --- a/compiler/testData/codegen/box/coroutines/tryCatchFinallyWithHandleResult.kt +++ b/compiler/testData/codegen/box/coroutines/tryCatchFinallyWithHandleResult.kt @@ -21,7 +21,7 @@ class Controller { SUSPENDED } - fun run(c: @Suspend() (Controller.() -> String)) { + fun run(c: suspend Controller.() -> String) { c.startCoroutine(this, handleResultContinuation { globalResult = it }) @@ -34,7 +34,7 @@ class Controller { // INTERCEPT_RESUME_PLACEHOLDER } -fun builder(expectException: Boolean = false, c: @Suspend() (Controller.() -> String)) { +fun builder(expectException: Boolean = false, c: suspend Controller.() -> String) { val controller = Controller() globalResult = "#" diff --git a/compiler/testData/codegen/box/coroutines/tryCatchWithHandleResult.kt b/compiler/testData/codegen/box/coroutines/tryCatchWithHandleResult.kt index 2752e3d5ced..a0dd14b4ba1 100644 --- a/compiler/testData/codegen/box/coroutines/tryCatchWithHandleResult.kt +++ b/compiler/testData/codegen/box/coroutines/tryCatchWithHandleResult.kt @@ -21,7 +21,7 @@ class Controller { SUSPENDED } - fun run(c: @Suspend() (Controller.() -> String)) { + fun run(c: suspend Controller.() -> String) { c.startCoroutine(this, handleResultContinuation { globalResult = it }) @@ -32,7 +32,7 @@ class Controller { } } -fun builder(expectException: Boolean = false, c: @Suspend() (Controller.() -> String)) { +fun builder(expectException: Boolean = false, c: suspend Controller.() -> String) { val controller = Controller() globalResult = "#" diff --git a/compiler/testData/codegen/box/coroutines/tryFinallyInsideInlineLambda.kt b/compiler/testData/codegen/box/coroutines/tryFinallyInsideInlineLambda.kt index 492f6426eb2..c6ed7064698 100644 --- a/compiler/testData/codegen/box/coroutines/tryFinallyInsideInlineLambda.kt +++ b/compiler/testData/codegen/box/coroutines/tryFinallyInsideInlineLambda.kt @@ -10,7 +10,7 @@ class Controller { // INTERCEPT_RESUME_PLACEHOLDER } -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { c.startCoroutine(Controller(), EmptyContinuation) } diff --git a/compiler/testData/codegen/box/coroutines/tryFinallyWithHandleResult.kt b/compiler/testData/codegen/box/coroutines/tryFinallyWithHandleResult.kt index 53d22676229..b1e5896fcf3 100644 --- a/compiler/testData/codegen/box/coroutines/tryFinallyWithHandleResult.kt +++ b/compiler/testData/codegen/box/coroutines/tryFinallyWithHandleResult.kt @@ -21,7 +21,7 @@ class Controller { SUSPENDED } - fun run(c: @Suspend() (Controller.() -> String)) { + fun run(c: suspend Controller.() -> String) { c.startCoroutine(this, handleResultContinuation { globalResult = it }) @@ -34,7 +34,7 @@ class Controller { // INTERCEPT_RESUME_PLACEHOLDER } -fun builder(expectException: Boolean = false, c: @Suspend() (Controller.() -> String)) { +fun builder(expectException: Boolean = false, c: suspend Controller.() -> String) { val controller = Controller() globalResult = "#" diff --git a/compiler/testData/codegen/box/coroutines/varValueConflictsWithTable.kt b/compiler/testData/codegen/box/coroutines/varValueConflictsWithTable.kt index 6ade0df22fb..fb36151d1ad 100644 --- a/compiler/testData/codegen/box/coroutines/varValueConflictsWithTable.kt +++ b/compiler/testData/codegen/box/coroutines/varValueConflictsWithTable.kt @@ -9,7 +9,7 @@ class Controller { // INTERCEPT_RESUME_PLACEHOLDER } -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { c.startCoroutine(Controller(), EmptyContinuation) } diff --git a/compiler/testData/codegen/box/coroutines/varValueConflictsWithTableSameSort.kt b/compiler/testData/codegen/box/coroutines/varValueConflictsWithTableSameSort.kt index 7b89257b7fb..5791fe6cbb7 100644 --- a/compiler/testData/codegen/box/coroutines/varValueConflictsWithTableSameSort.kt +++ b/compiler/testData/codegen/box/coroutines/varValueConflictsWithTableSameSort.kt @@ -9,7 +9,7 @@ class Controller { // INTERCEPT_RESUME_PLACEHOLDER } -fun builder(c: @Suspend() (Controller.() -> Unit)) { +fun builder(c: suspend Controller.() -> Unit) { c.startCoroutine(Controller(), EmptyContinuation) }