FIR: Make 'suspend fun', where 'suspend' is not builtin error in 1.8
#KT-49264
This commit is contained in:
Vendored
-29
@@ -1,29 +0,0 @@
|
||||
// SKIP_TXT
|
||||
|
||||
infix fun Int.suspend(c: () -> Unit) { c() }
|
||||
|
||||
fun bar() {
|
||||
1 <!MODIFIER_FORM_FOR_NON_BUILT_IN_SUSPEND!>suspend<!> fun() {
|
||||
println()
|
||||
}
|
||||
|
||||
1 <!SYNTAX!>@Ann suspend fun()<!> {
|
||||
println()
|
||||
}
|
||||
|
||||
1 <!MODIFIER_FORM_FOR_NON_BUILT_IN_SUSPEND!>suspend<!> @Ann fun() {
|
||||
println()
|
||||
}
|
||||
}
|
||||
|
||||
@Target(AnnotationTarget.EXPRESSION)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
annotation class Ann
|
||||
|
||||
fun main(suspend: WLambdaInvoke) {
|
||||
1 <!MODIFIER_FORM_FOR_NON_BUILT_IN_SUSPEND!>suspend<!> fun() {}
|
||||
}
|
||||
|
||||
class WLambdaInvoke {
|
||||
operator fun Int.invoke(l: () -> Unit) {}
|
||||
}
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// SKIP_TXT
|
||||
|
||||
infix fun Int.suspend(c: () -> Unit) { c() }
|
||||
|
||||
Reference in New Issue
Block a user