[FIR] Add INLINE_SUSPEND_FUNCTION_TYPE_UNSUPPORTED diagnostic
This commit is contained in:
committed by
teamcityserver
parent
b2f3485d7c
commit
e56deb4525
+1
-1
@@ -17,7 +17,7 @@ interface SuspendRunnable {
|
||||
// It is NOT possible to call startCoroutine on the parameter
|
||||
// suspend calls possible inside lambda matching to the parameter
|
||||
|
||||
inline fun test(c: suspend () -> Unit) {
|
||||
inline fun test(<!INLINE_SUSPEND_FUNCTION_TYPE_UNSUPPORTED!>c: suspend () -> Unit<!>) {
|
||||
<!ILLEGAL_SUSPEND_FUNCTION_CALL!>c<!>()
|
||||
val o = object: SuspendRunnable {
|
||||
override suspend fun run() {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// SKIP_TXT
|
||||
inline fun foo1(x: suspend () -> Unit) {}
|
||||
inline fun foo1(<!INLINE_SUSPEND_FUNCTION_TYPE_UNSUPPORTED!>x: suspend () -> Unit<!>) {}
|
||||
inline fun foo2(crossinline x: suspend () -> Unit) {}
|
||||
<!NOTHING_TO_INLINE!>inline<!> fun foo3(noinline x: suspend () -> Unit) {}
|
||||
<!NOTHING_TO_INLINE!>inline<!> fun foo4(<!INCOMPATIBLE_MODIFIERS!>noinline<!> <!INCOMPATIBLE_MODIFIERS!>crossinline<!> x: suspend () -> Unit) {}
|
||||
|
||||
Reference in New Issue
Block a user