This seems to be some sort of regression, because it was fixed with GRECLIPSE-1695.
Consider the following Groovy class:
package test10
class Bar {
void bar() {
List<String> myList = new ArrayList<String>()
myList.each {
it.trim() // it detected as String correctly here
}
myList.sort { a, b ->
a.trim() <=> b.trim() // a and b detected as String correctly here
}
myList.sort { a, b ->
a.trim() <=> b.trim() // a and b detected as String correctly here
}.each {
it.trim() // it not detected as String here!
}
}
}
As you can see, the last it.trim() is underlined because it is not recognized as String. Probably this is because the call to myList.sort { } is wrongly recognized as a call to Java 8 java.util.List.sort(Comparator<? super E>), which returns void.
This seems to be some sort of regression, because it was fixed with GRECLIPSE-1695.
Consider the following Groovy class:
As you can see, the last
it.trim()is underlined becauseitis not recognized asString. Probably this is because the call tomyList.sort { }is wrongly recognized as a call to Java 8java.util.List.sort(Comparator<? super E>), which returnsvoid.