JetBrains/kotlin — pull request #271 by lopekpl (2013-05-15 23:19:00+00:00)
Title: QuickFixes for TYPE_MISMATCH error

Continuation of https://github.com/JetBrains/kotlin/pull/261.

Thanks for the use-cases! I fixed some of issues you mentioned:

1) I modified previous commits to handle following case:
```
fun foo0(x: Any): () -> Int {
return {x} // qfix "Change function literal return type to Any" doesn't work
}
````

In seperate commits I added handling for these cases:
2)
```
trait A {
var x: (String) -> Int
}
trait B : A {
override var x: (Int) -> String // would be nice if we had here was one more qfix, like -- change type of `A.x` to `(Int) -> String`
}
```

3)
```
class C {
val y: Int
get(): Int = {42} // i think, qfix should be available
}
```

4)
```
class A(val a: Int)

fun foo() {
A("") // qfix should be available
}
```

If you insist I can work on the rest of cases you listed, and improve this PR. But if it is possible I would rather we work on getting this PR merged first and then I could work on quickfixes for other cases.