JetBrains/kotlin — pull request #433 by kuity (2014-04-03 20:03:35+00:00)
Title: Bug Fix for KT-4652 Replace with Infix Call

This is a fix for KT-4652 Replace With Infix Call.
Link: http://youtrack.jetbrains.com/issue/KT-4652
Issue: The applicable context was thought to be too large, as below:
```
package boo

fun main(args: Array) {
// intention will be applied here
A().g(object: T {
// may include hundreds of lines of code
override fun f() {
//intention is applicable here
1 + 2
}
})
}

trait T {
fun f()
}

class A {
fun g(t: T) {
}
}
```

Proposed solution:
I narrowed the scope down to be applicable only when the caret is anywhere on the callee expression or immediately after it.