Support explicit this receiver (this.foo()) for RestrictSuspension function call.
This commit is contained in:
+27
-9
@@ -14,22 +14,40 @@ fun test() {
|
||||
member()
|
||||
extension()
|
||||
|
||||
// todo
|
||||
this.<!ILLEGAL_RESTRICTED_SUSPENDING_FUNCTION_CALL!>member<!>()
|
||||
this.<!ILLEGAL_RESTRICTED_SUSPENDING_FUNCTION_CALL!>extension<!>()
|
||||
this.member()
|
||||
this.extension()
|
||||
|
||||
val foo = this
|
||||
foo.<!ILLEGAL_RESTRICTED_SUSPENDING_FUNCTION_CALL!>member<!>()
|
||||
foo.<!ILLEGAL_RESTRICTED_SUSPENDING_FUNCTION_CALL!>extension<!>()
|
||||
|
||||
// todo
|
||||
this@l.<!ILLEGAL_RESTRICTED_SUSPENDING_FUNCTION_CALL!>member<!>()
|
||||
this@l.<!ILLEGAL_RESTRICTED_SUSPENDING_FUNCTION_CALL!>extension<!>()
|
||||
this@l.member()
|
||||
this@l.extension()
|
||||
|
||||
with(1) {
|
||||
// todo
|
||||
this@l.<!ILLEGAL_RESTRICTED_SUSPENDING_FUNCTION_CALL!>member<!>()
|
||||
this@l.<!ILLEGAL_RESTRICTED_SUSPENDING_FUNCTION_CALL!>extension<!>()
|
||||
this@l.member()
|
||||
this@l.extension()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun RestrictedController.l() {
|
||||
member()
|
||||
extension()
|
||||
|
||||
this.member()
|
||||
this.extension()
|
||||
|
||||
val foo = this
|
||||
foo.<!ILLEGAL_RESTRICTED_SUSPENDING_FUNCTION_CALL!>member<!>()
|
||||
foo.<!ILLEGAL_RESTRICTED_SUSPENDING_FUNCTION_CALL!>extension<!>()
|
||||
|
||||
this@l.member()
|
||||
this@l.extension()
|
||||
|
||||
with(1) {
|
||||
this@l.member()
|
||||
this@l.extension()
|
||||
}
|
||||
|
||||
}
|
||||
+1
@@ -3,6 +3,7 @@ package
|
||||
public fun generate(/*0*/ f: suspend RestrictedController.() -> kotlin.Unit): kotlin.Unit
|
||||
public fun test(): kotlin.Unit
|
||||
public suspend fun RestrictedController.extension(): kotlin.Unit
|
||||
public suspend fun RestrictedController.l(): kotlin.Unit
|
||||
|
||||
@kotlin.coroutines.RestrictSuspension public final class RestrictedController {
|
||||
public constructor RestrictedController()
|
||||
|
||||
Reference in New Issue
Block a user