Additional item inserting lambda provided by completion when all parameters before the last are optional

This commit is contained in:
Valentin Kipyatkov
2015-08-27 22:38:03 +03:00
parent dfe4f8e34f
commit 2de5229098
15 changed files with 169 additions and 64 deletions
@@ -0,0 +1,9 @@
fun xfoo(option1: String = "", option2: Int = 1, p: () -> Unit){}
fun test(param: () -> Unit) {
xfoo<caret>
}
// ELEMENT: xfoo
// TAIL_TEXT: " {...} (p: () -> Unit) (<root>)"
@@ -0,0 +1,9 @@
fun xfoo(option1: String = "", option2: Int = 1, p: () -> Unit){}
fun test(param: () -> Unit) {
xfoo { <caret> }
}
// ELEMENT: xfoo
// TAIL_TEXT: " {...} (p: () -> Unit) (<root>)"
@@ -0,0 +1,9 @@
fun xfoo(option1: String = "", option2: Int = 1, p: (String, Int) -> Unit){}
fun test(param: () -> Unit) {
xfoo<caret>
}
// ELEMENT: xfoo
// TAIL_TEXT: " { String, Int -> ... } (p: (String, Int) -> Unit) (<root>)"
@@ -0,0 +1,9 @@
fun xfoo(option1: String = "", option2: Int = 1, p: (String, Int) -> Unit){}
fun test(param: () -> Unit) {
xfoo { s, i -> <caret> }
}
// ELEMENT: xfoo
// TAIL_TEXT: " { String, Int -> ... } (p: (String, Int) -> Unit) (<root>)"