Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
1.7.5
-
None
-
None
Description
In GRECLIPSE-951, I noticed that all references to primitive types are using the same cached singleton. So in this code:
int x() { int z }
both references to int are represented in the AST by the same ClassNode object. This means that source locations for the int singleton ClassNode are always the last time it is used in the file.
This is a problem for Groovy-Eclipse since we rely on source locations for searching and marking occurrences.
It seems to me that the solution is to add a redirect to the primitive ClassNode and set its source location.