K1/K2: allow to apply suspend modifier to anonymous function
#KT-57991 Fixed
This commit is contained in:
committed by
Space Team
parent
0dbf698653
commit
2ccad553e6
@@ -217,7 +217,12 @@ val possibleTargetMap = mapOf(
|
||||
),
|
||||
NOINLINE_KEYWORD to EnumSet.of(KotlinTarget.VALUE_PARAMETER),
|
||||
TAILREC_KEYWORD to EnumSet.of(KotlinTarget.FUNCTION),
|
||||
SUSPEND_KEYWORD to EnumSet.of(KotlinTarget.MEMBER_FUNCTION, KotlinTarget.TOP_LEVEL_FUNCTION, KotlinTarget.LOCAL_FUNCTION),
|
||||
SUSPEND_KEYWORD to EnumSet.of(
|
||||
KotlinTarget.MEMBER_FUNCTION,
|
||||
KotlinTarget.TOP_LEVEL_FUNCTION,
|
||||
KotlinTarget.LOCAL_FUNCTION,
|
||||
KotlinTarget.ANONYMOUS_FUNCTION
|
||||
),
|
||||
EXTERNAL_KEYWORD to EnumSet.of(
|
||||
KotlinTarget.FUNCTION,
|
||||
KotlinTarget.PROPERTY,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// ISSUE: KT-57991
|
||||
|
||||
fun foo() {
|
||||
<!WRONG_MODIFIER_TARGET!>suspend<!> fun() {
|
||||
suspend fun() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user