Move lambda out: don't apply to multiple/default functional parameters

So #KT-24694 Fixed
This commit is contained in:
Toshiaki Kameyama
2018-06-26 17:43:59 +03:00
committed by Mikhail Glukhikh
parent a9c91099a4
commit 3e207fd6b2
5 changed files with 40 additions and 5 deletions
@@ -0,0 +1,10 @@
// PROBLEM: none
fun test(a: (String) -> Unit = {}, b: (String) -> Unit = {}) {
a("a")
b("b")
}
fun foo() {
test(<caret>{ })
}
@@ -0,0 +1,8 @@
fun test(a: (String) -> Unit = {}, b: (String) -> Unit = {}) {
a("a")
b("b")
}
fun foo() {
test({ }, { }<caret>)
}
@@ -0,0 +1,8 @@
fun test(a: (String) -> Unit = {}, b: (String) -> Unit = {}) {
a("a")
b("b")
}
fun foo() {
test({ }) { }
}