Suggest postfix templates on lambda expressions

This commit is contained in:
Denis Zharkov
2016-09-29 11:35:54 +03:00
parent 54d9b4bee6
commit ba2d2a036e
7 changed files with 40 additions and 4 deletions
+3
View File
@@ -0,0 +1,3 @@
fun foo() {
{ y: Int -> "abc" }.val<caret>
}
+3
View File
@@ -0,0 +1,3 @@
fun foo() {
val function = { y: Int -> "abc" }
}
@@ -0,0 +1,5 @@
// ALLOW_MULTIPLE_EXPRESSIONS
fun bar(x: (Int) -> String) = x(1)
fun foo() {
bar() { y: Int -> "abc" }.val<caret>
}
@@ -0,0 +1,5 @@
// ALLOW_MULTIPLE_EXPRESSIONS
fun bar(x: (Int) -> String) = x(1)
fun foo() {
val bar = bar() { y: Int -> "abc" }
}