If the last argument of a function is a suspend function,

suggest trailing lambda variant in completion.
This commit is contained in:
Dmitry Petrov
2016-12-15 16:00:22 +03:00
committed by Stanislav Erokhin
parent f9d550732e
commit 8e3fd0efc3
5 changed files with 27 additions and 5 deletions
@@ -0,0 +1,9 @@
fun xfoo(p: suspend () -> Unit) {}
fun test() {
xf<caret>
}
// EXIST: { itemText:"xfoo", tailText:" {...} (p: suspend () -> Unit) (<root>)", typeText:"Unit" }
// EXIST: { itemText:"xfoo", tailText:"(p: suspend () -> Unit) (<root>)", typeText:"Unit" }
// NOTHING_ELSE