KT-2300 Auto-insertion of parenthesis by completion is not good for functions like "filter"

#KT-2300 fixed
This commit is contained in:
Evgeny Gerashchenko
2012-07-21 23:31:26 +04:00
parent 7c95c0a617
commit 03f38ef52a
8 changed files with 70 additions and 12 deletions
@@ -0,0 +1,5 @@
fun <T> jet.Array<T>.filter(predicate : (T) -> jet.Boolean) : java.util.List<T> = throw UnsupportedOperationException()
fun main(args: Array<String>) {
args.fil<caret>
}
@@ -0,0 +1,5 @@
fun <T> jet.Array<T>.filter(predicate : (T) -> jet.Boolean) : java.util.List<T> = throw UnsupportedOperationException()
fun main(args: Array<String>) {
args.filter {<caret>}
}
@@ -0,0 +1,7 @@
fun <T> jet.Array<T>.filter(predicate : (T) -> jet.Boolean) : java.util.List<T> = throw UnsupportedOperationException()
fun <T> jet.Array<T>.filterNot(predicate : (T) -> jet.Boolean) : java.util.List<T> = throw UnsupportedOperationException()
fun main(args: Array<String>) {
args.filter<caret> {it != ""}
}
@@ -0,0 +1,7 @@
fun <T> jet.Array<T>.filter(predicate : (T) -> jet.Boolean) : java.util.List<T> = throw UnsupportedOperationException()
fun <T> jet.Array<T>.filterNot(predicate : (T) -> jet.Boolean) : java.util.List<T> = throw UnsupportedOperationException()
fun main(args: Array<String>) {
args.filterNot {<caret>it != ""}
}