JetBrains/kotlin — pull request #346 by dezgeg (2014-01-31 06:44:25+00:00)
Title: Add intention for replacing method calls to get() with bracket syntax (v2)

Addresses comments given on https://github.com/JetBrains/kotlin/pull/343 . I can't seem to add any commits to that PR since it was closed.

Changes (rebased on top):
- Improve language of user-visible messages
- Instead of hard coded strings, get messages from the message bundle
- All test cases should now be individual compilable modules
- Caret is now positioned explicitly (after the closing ']') and is tested as well
- Added checking & tests for calls with function literal arguments and type arguments

--
Kotlin allows the array access operator (e.g. list[0]) to be overloaded:
the bracket syntax is mostly equivalent to calling the get() method.
Add an intention action for transforming get() calls into the bracket
syntax where possible:

- The call must have an explicit receiver (dot expression).
- There is at least one argument.
- There aren't any arguments passed by name.
- There are no type arguments or function literal arguments.