[K2] Disappeared UNSUPPORTED
Mark as UNSUPPORTED suspension points in default parameters ^KT-59881
This commit is contained in:
committed by
Space Team
parent
c1f6fe1e76
commit
6471080c48
+4
-2
@@ -4,10 +4,11 @@
|
||||
suspend fun foo() = 1
|
||||
|
||||
suspend fun bar(
|
||||
x: Int = 2 + foo(),
|
||||
x: Int = 2 + <!UNSUPPORTED!>foo()<!>,
|
||||
y: suspend () -> Int = { foo() },
|
||||
z: () -> Int = { <!NON_LOCAL_SUSPENSION_POINT!>foo<!>() },
|
||||
w: Int = myInline { foo() },
|
||||
w: Int = myInline { <!UNSUPPORTED!>foo()<!> },
|
||||
q: Int = myInline2 { <!NON_LOCAL_SUSPENSION_POINT!>foo<!>() },
|
||||
v: Any? = object {
|
||||
fun x() = <!NON_LOCAL_SUSPENSION_POINT!>foo<!>()
|
||||
suspend fun y() = foo()
|
||||
@@ -15,3 +16,4 @@ suspend fun bar(
|
||||
) {}
|
||||
|
||||
inline fun myInline(x: () -> Unit) = 1
|
||||
inline fun myInline2(crossinline x: () -> Unit) = 1
|
||||
|
||||
+2
@@ -8,6 +8,7 @@ suspend fun bar(
|
||||
y: suspend () -> Int = { foo() },
|
||||
z: () -> Int = { <!NON_LOCAL_SUSPENSION_POINT!>foo<!>() },
|
||||
w: Int = myInline { <!UNSUPPORTED!>foo<!>() },
|
||||
q: Int = myInline2 { <!NON_LOCAL_SUSPENSION_POINT!>foo<!>() },
|
||||
v: Any? = object {
|
||||
fun x() = <!NON_LOCAL_SUSPENSION_POINT!>foo<!>()
|
||||
suspend fun y() = foo()
|
||||
@@ -15,3 +16,4 @@ suspend fun bar(
|
||||
) {}
|
||||
|
||||
inline fun myInline(x: () -> Unit) = 1
|
||||
inline fun myInline2(crossinline x: () -> Unit) = 1
|
||||
|
||||
Reference in New Issue
Block a user