Add quickfix for 'Illegal inline parameter modifier'
Adds inline to function if crossinline is used on parameter #KT-14046 Fixed
This commit is contained in:
+5
@@ -0,0 +1,5 @@
|
||||
// "Add 'inline' to function 'foo'" "true"
|
||||
|
||||
fun foo(<caret>crossinline body: () -> Unit) {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// "Add 'inline' to function 'foo'" "true"
|
||||
|
||||
inline fun foo(<caret>crossinline body: () -> Unit) {
|
||||
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Add 'inline' to function 'foo'" "false"
|
||||
// ACTION: Convert to expression body
|
||||
// ERROR: Modifier 'crossinline' is allowed only for function parameters of an inline function
|
||||
|
||||
fun bar() {
|
||||
fun foo(<caret>crossinline body: () -> Unit) {
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user