JetBrains/kotlin — pull request #446 by kuity (2014-04-15 23:03:40+00:00)
Title: KT-4579 Make Type Explicit/Implicit in Lambda

Second PR for this intention continued from https://github.com/JetBrains/kotlin/pull/441
Changes:
* Many more tests added. Now covers more types besides Int.
* Intention is now only available when cursor is at braces or in the parameter list
* Edited mistakes in code pointed out in the first PR

I think the first intention, making type explicit in lambda, is generally fine but I am still a little concerned for the second part, making type implicit in lambda. For now, say in the case:
```
fun sum = {(a: Int, b: Int): Int -> a + b}
```
My intention make type implicit in lambda can be applied changing it to
```
fun sum = {(a, b) -> a + b}
```
which is what the intention is meant to do, however, this code is wrong and produces red lines in the editor as the type could not be inferred from the context. I'm not very sure how to deal with this problem or if it even should be dealt with in the first place.