Report warning on "suspend {}"-like calls based on variable
#KT-22892 Fixed
This commit is contained in:
+9
@@ -34,3 +34,12 @@ fun bar() {
|
||||
@Target(AnnotationTarget.EXPRESSION)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
annotation class Ann
|
||||
|
||||
fun main(suspend: WLambdaInvoke) {
|
||||
|
||||
<!MODIFIER_FORM_FOR_NON_BUILT_IN_SUSPEND!>suspend<!> {}
|
||||
}
|
||||
|
||||
class WLambdaInvoke {
|
||||
operator fun invoke(<!UNUSED_PARAMETER!>l<!>: () -> Unit) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user