Use correct function to check for function type in InlineParameterChecker
There's no use of noinline/crossinline modifiers on parameters of _subtypes_ of function types #KT-11411 Fixed
This commit is contained in:
@@ -9,3 +9,12 @@ fun gav(<!ILLEGAL_INLINE_PARAMETER_MODIFIER!>noinline<!> x: (Int) -> Unit, <!ILL
|
||||
inline fun correct(noinline x: (Int) -> Unit, crossinline y: (String) -> Int) {}
|
||||
|
||||
<!NOTHING_TO_INLINE!>inline<!> fun incompatible(<!INCOMPATIBLE_MODIFIERS!>noinline<!> <!INCOMPATIBLE_MODIFIERS!>crossinline<!> x: () -> String) {}
|
||||
|
||||
class FunctionSubtype : () -> Unit {
|
||||
override fun invoke() {}
|
||||
}
|
||||
|
||||
<!NOTHING_TO_INLINE!>inline<!> fun functionSubtype(
|
||||
<!ILLEGAL_INLINE_PARAMETER_MODIFIER!>noinline<!> f: FunctionSubtype,
|
||||
<!ILLEGAL_INLINE_PARAMETER_MODIFIER!>crossinline<!> g: FunctionSubtype
|
||||
) { }
|
||||
|
||||
Reference in New Issue
Block a user