"Move lambda outside parenthesis" should not be available when not valid
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
// IS_AVAILABLE: true
|
||||
// ERROR: <html>None of the following functions can be called with the arguments supplied. <ul><li>bar(<font color=red><b>Int = ...</b></font>, <font color=red><b>(Int) → Int</b></font>) <i>defined in</i> root package</li><li>bar(<font color=red><b>Int</b></font>, <font color=red><b>Int</b></font>, <font color=red><b>(Int) → Int</b></font>) <i>defined in</i> root package</li></ul></html>
|
||||
// ERROR: Unresolved reference: it
|
||||
|
||||
fun foo() {
|
||||
bar(<caret>{ it })
|
||||
}
|
||||
|
||||
fun bar(a: Int = 0, f: (Int) -> Int) { }
|
||||
fun bar(a: Int, b: Int, f: (Int) -> Int) { }
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
// IS_AVAILABLE: true
|
||||
// ERROR: <html>None of the following functions can be called with the arguments supplied. <ul><li>bar(<font color=red><b>Int = ...</b></font>, <font color=red><b>(Int) → Int</b></font>) <i>defined in</i> root package</li><li>bar(<font color=red><b>Int</b></font>, <font color=red><b>Int</b></font>, <font color=red><b>(Int) → Int</b></font>) <i>defined in</i> root package</li></ul></html>
|
||||
// ERROR: Unresolved reference: it
|
||||
|
||||
fun foo() {
|
||||
bar <caret>{ it }
|
||||
}
|
||||
|
||||
fun bar(a: Int = 0, f: (Int) -> Int) { }
|
||||
fun bar(a: Int, b: Int, f: (Int) -> Int) { }
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
fun foo(p: (Int, () -> Int) -> Unit) {
|
||||
p(1, <caret>{ 2 })
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fun foo(p: (Int, () -> Int) -> Unit) {
|
||||
p(1) <caret>{ 2 }
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// IS_APPLICABLE: false
|
||||
fun foo() {
|
||||
bar(<caret>{ it })
|
||||
}
|
||||
|
||||
fun bar(b: (Int) -> Int, option: Int = 0) { }
|
||||
Reference in New Issue
Block a user