FIR checker: Create a new kind of checker FirTypeChecker and add
FirSuspendModifierChecker to report WRONG_MODIFIER_TARGET for `suspend` on non-functional types.
This commit is contained in:
committed by
TeamCityServer
parent
4282d17467
commit
e69b729e21
+2
-1
@@ -22,7 +22,8 @@ typealias Test15 = (@A() suspend () -> Unit)?
|
||||
typealias Test16 = (@A suspend () -> Unit)?
|
||||
typealias Test17 = @A suspend RS.() -> Unit
|
||||
typealias Test18 = (suspend () -> Unit)?
|
||||
typealias Test19 = (@A({ val x: <!WRONG_MODIFIER_TARGET!>suspend<!> String? = null; "" }()) suspend () -> Unit)?
|
||||
typealias Test19 = (@A({ val x: <!WRONG_MODIFIER_TARGET, WRONG_MODIFIER_TARGET!>suspend<!> String? = null; "" }()) suspend () -> Unit)?
|
||||
typealias Test20 = (@A("".let { val x: <!WRONG_MODIFIER_TARGET, WRONG_MODIFIER_TARGET!>suspend<!> String? = null; it }) suspend () -> Unit)?
|
||||
|
||||
interface Supertype1 : suspend () -> Unit {
|
||||
|
||||
|
||||
+1
@@ -23,6 +23,7 @@ typealias Test16 = (@A suspend () -> Unit)?
|
||||
typealias Test17 = @A suspend RS.() -> Unit
|
||||
typealias Test18 = (suspend () -> Unit)?
|
||||
typealias Test19 = (@A(<!ANNOTATION_ARGUMENT_MUST_BE_CONST!>{ val x: <!WRONG_MODIFIER_TARGET, WRONG_MODIFIER_TARGET!>suspend<!> String? = null; "" }()<!>) suspend () -> Unit)?
|
||||
typealias Test20 = (@A(<!ANNOTATION_ARGUMENT_MUST_BE_CONST!>"".let { val x: <!WRONG_MODIFIER_TARGET, WRONG_MODIFIER_TARGET!>suspend<!> String? = null; it }<!>) suspend () -> Unit)?
|
||||
|
||||
interface Supertype1 : <!SUPERTYPE_IS_SUSPEND_FUNCTION_TYPE!>suspend () -> Unit<!> {
|
||||
|
||||
|
||||
+1
@@ -47,6 +47,7 @@ public typealias Test17 = (@A suspend RS.() -> kotlin.Unit)
|
||||
public typealias Test18 = (suspend () -> kotlin.Unit)?
|
||||
public typealias Test19 = (@A suspend () -> kotlin.Unit)?
|
||||
public typealias Test2 = suspend kotlin.Int.() -> kotlin.Unit
|
||||
public typealias Test20 = (@A suspend () -> kotlin.Unit)?
|
||||
public typealias Test3 = () -> kotlin.Unit
|
||||
public typealias Test4 = Action
|
||||
public typealias Test5 = kotlin.collections.List<suspend () -> kotlin.Unit>
|
||||
|
||||
Reference in New Issue
Block a user