Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

And, of course, the editor will notify you when you are using a loop variable incorrectly:

What's not working yet

DGM inferencing
Map and list inferencing is only very simpleThere are a couple of pieces not yet implemented in this area, that we are planning post 2.1.0. First, inferencing of the type of the closure variable inside of DefaultGroovyMethods is not available yet. For example:

Code Block

def x = [1, 2]
x.each { print it.abs() }

In this situation, the type of it is Integer and the abs() method is valid, but it will be underlined in the Groovy editor.

Also, type inferencing for maps and lists is currently simple. The static type of the first element of the list or map is looked at. If the type can be determined, then it is used, otherwise Object is used.

Generics-aware hover support

...