FIR: Fix false-positive ILLEGAL_RESTRICTED_SUSPENDING_FUNCTION_CALL on invokeExtension calls

This commit is contained in:
Denis.Zharkov
2021-10-28 11:20:33 +03:00
committed by TeamCityServer
parent 37b5237e97
commit 2e37ec6f0c
6 changed files with 80 additions and 8 deletions
@@ -0,0 +1,18 @@
// FIR_IDENTICAL
// SKIP_TXT
import kotlin.coroutines.RestrictsSuspension
@RestrictsSuspension
interface Scope
suspend fun Scope.foo(
a1: suspend Scope.() -> Unit,
a2: suspend () -> Unit,
a3: suspend String.() -> Unit,
) {
a1()
this.a1()
<!ILLEGAL_RESTRICTED_SUSPENDING_FUNCTION_CALL!>a2<!>()
"".<!ILLEGAL_RESTRICTED_SUSPENDING_FUNCTION_CALL!>a3<!>()
}