diff --git a/plugins/kotlin/code-insight/inspections-k2/tests/testData/inspectionsLocal/coroutines/ambiguousCoroutineScope/functionExtensionReceiver_suspendWrapper_suspendFunInterface.kt b/plugins/kotlin/code-insight/inspections-k2/tests/testData/inspectionsLocal/coroutines/ambiguousCoroutineScope/functionExtensionReceiver_suspendWrapper_suspendFunInterface.kt index f44aae041e61..6af2750db8a0 100644 --- a/plugins/kotlin/code-insight/inspections-k2/tests/testData/inspectionsLocal/coroutines/ambiguousCoroutineScope/functionExtensionReceiver_suspendWrapper_suspendFunInterface.kt +++ b/plugins/kotlin/code-insight/inspections-k2/tests/testData/inspectionsLocal/coroutines/ambiguousCoroutineScope/functionExtensionReceiver_suspendWrapper_suspendFunInterface.kt @@ -5,11 +5,11 @@ package test import kotlinx.coroutines.CoroutineScope -fun interface CustomSuspendLambda { +fun interface CustomSuspendAction { suspend fun customInvoke(): Unit } -private suspend fun suspendWrapper(action: CustomSuspendLambda) { +private suspend fun suspendWrapper(action: CustomSuspendAction) { action.customInvoke() } diff --git a/plugins/kotlin/code-insight/inspections-k2/tests/testData/inspectionsLocal/coroutines/ambiguousCoroutineScope/functionExtensionReceiver_suspendWrapper_suspendFunInterface.kt.after b/plugins/kotlin/code-insight/inspections-k2/tests/testData/inspectionsLocal/coroutines/ambiguousCoroutineScope/functionExtensionReceiver_suspendWrapper_suspendFunInterface.kt.after index 72ab31a3a8dd..fa20d6d6d04d 100644 --- a/plugins/kotlin/code-insight/inspections-k2/tests/testData/inspectionsLocal/coroutines/ambiguousCoroutineScope/functionExtensionReceiver_suspendWrapper_suspendFunInterface.kt.after +++ b/plugins/kotlin/code-insight/inspections-k2/tests/testData/inspectionsLocal/coroutines/ambiguousCoroutineScope/functionExtensionReceiver_suspendWrapper_suspendFunInterface.kt.after @@ -5,11 +5,11 @@ package test import kotlinx.coroutines.CoroutineScope -fun interface CustomSuspendLambda { +fun interface CustomSuspendAction { suspend fun customInvoke(): Unit } -private suspend fun suspendWrapper(action: CustomSuspendLambda) { +private suspend fun suspendWrapper(action: CustomSuspendAction) { action.customInvoke() } diff --git a/plugins/kotlin/code-insight/inspections-k2/tests/testData/inspectionsLocal/coroutines/ambiguousCoroutineScope/functionExtensionReceiver_suspendWrapper_suspendFunInterfaceJava.1.java b/plugins/kotlin/code-insight/inspections-k2/tests/testData/inspectionsLocal/coroutines/ambiguousCoroutineScope/functionExtensionReceiver_suspendWrapper_suspendFunInterfaceJava.1.java index c21aa947d45b..b016dda7be2f 100644 --- a/plugins/kotlin/code-insight/inspections-k2/tests/testData/inspectionsLocal/coroutines/ambiguousCoroutineScope/functionExtensionReceiver_suspendWrapper_suspendFunInterfaceJava.1.java +++ b/plugins/kotlin/code-insight/inspections-k2/tests/testData/inspectionsLocal/coroutines/ambiguousCoroutineScope/functionExtensionReceiver_suspendWrapper_suspendFunInterfaceJava.1.java @@ -1,13 +1,13 @@ -package test +package test; -import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.CoroutineScope; -interface CustomSuspendLambda { +interface CustomAction { void customInvoke(); } class Main { - static void suspendWrapper(CustomSuspendLambda action) { + static void javaStaticWrapper(CustomAction action) { action.customInvoke(); } } \ No newline at end of file diff --git a/plugins/kotlin/code-insight/inspections-k2/tests/testData/inspectionsLocal/coroutines/ambiguousCoroutineScope/functionExtensionReceiver_suspendWrapper_suspendFunInterfaceJava.kt b/plugins/kotlin/code-insight/inspections-k2/tests/testData/inspectionsLocal/coroutines/ambiguousCoroutineScope/functionExtensionReceiver_suspendWrapper_suspendFunInterfaceJava.kt index 9313c4539b21..1d21355fb528 100644 --- a/plugins/kotlin/code-insight/inspections-k2/tests/testData/inspectionsLocal/coroutines/ambiguousCoroutineScope/functionExtensionReceiver_suspendWrapper_suspendFunInterfaceJava.kt +++ b/plugins/kotlin/code-insight/inspections-k2/tests/testData/inspectionsLocal/coroutines/ambiguousCoroutineScope/functionExtensionReceiver_suspendWrapper_suspendFunInterfaceJava.kt @@ -8,7 +8,7 @@ import kotlinx.coroutines.CoroutineScope fun CoroutineScope.doStuff() {} suspend fun CoroutineScope.test() { - Main.suspendWrapper { + Main.javaStaticWrapper { doStuff() } } \ No newline at end of file diff --git a/plugins/kotlin/code-insight/inspections-k2/tests/testData/inspectionsLocal/coroutines/ambiguousCoroutineScope/functionExtensionReceiver_suspendWrapper_suspendFunInterface_explicitSamConstructor.kt b/plugins/kotlin/code-insight/inspections-k2/tests/testData/inspectionsLocal/coroutines/ambiguousCoroutineScope/functionExtensionReceiver_suspendWrapper_suspendFunInterface_explicitSamConstructor.kt index a1bb9fe8f8ca..d062f19ade79 100644 --- a/plugins/kotlin/code-insight/inspections-k2/tests/testData/inspectionsLocal/coroutines/ambiguousCoroutineScope/functionExtensionReceiver_suspendWrapper_suspendFunInterface_explicitSamConstructor.kt +++ b/plugins/kotlin/code-insight/inspections-k2/tests/testData/inspectionsLocal/coroutines/ambiguousCoroutineScope/functionExtensionReceiver_suspendWrapper_suspendFunInterface_explicitSamConstructor.kt @@ -5,18 +5,18 @@ package test import kotlinx.coroutines.CoroutineScope -fun interface CustomSuspendLambda { +fun interface CustomSuspendAction { suspend fun customInvoke(): Unit } -private suspend fun suspendWrapper(action: CustomSuspendLambda) { +private suspend fun suspendWrapper(action: CustomSuspendAction) { action.customInvoke() } fun CoroutineScope.doStuff() {} suspend fun CoroutineScope.test() { - suspendWrapper(CustomSuspendLambda { + suspendWrapper(CustomSuspendAction { doStuff() }) } \ No newline at end of file diff --git a/plugins/kotlin/code-insight/inspections-k2/tests/testData/inspectionsLocal/coroutines/ambiguousCoroutineScope/functionExtensionReceiver_suspendWrapper_suspendFunInterface_explicitSamConstructor.kt.after b/plugins/kotlin/code-insight/inspections-k2/tests/testData/inspectionsLocal/coroutines/ambiguousCoroutineScope/functionExtensionReceiver_suspendWrapper_suspendFunInterface_explicitSamConstructor.kt.after index 66f64b1f7e07..fce01261e37c 100644 --- a/plugins/kotlin/code-insight/inspections-k2/tests/testData/inspectionsLocal/coroutines/ambiguousCoroutineScope/functionExtensionReceiver_suspendWrapper_suspendFunInterface_explicitSamConstructor.kt.after +++ b/plugins/kotlin/code-insight/inspections-k2/tests/testData/inspectionsLocal/coroutines/ambiguousCoroutineScope/functionExtensionReceiver_suspendWrapper_suspendFunInterface_explicitSamConstructor.kt.after @@ -5,18 +5,18 @@ package test import kotlinx.coroutines.CoroutineScope -fun interface CustomSuspendLambda { +fun interface CustomSuspendAction { suspend fun customInvoke(): Unit } -private suspend fun suspendWrapper(action: CustomSuspendLambda) { +private suspend fun suspendWrapper(action: CustomSuspendAction) { action.customInvoke() } fun CoroutineScope.doStuff() {} suspend fun CoroutineScope.test() { - suspendWrapper(CustomSuspendLambda { + suspendWrapper(CustomSuspendAction { this@test.doStuff() }) } \ No newline at end of file