Probably worth a triage step to work out whether it is principally a
Groovy or Spock issue. There was a similar issue we fixed earlier on
the Spock side (fix currently only in 1.2-groovy-2.4-SNAPSHOT).
That is where I suspect the bug will be. Whether we can possibly step around
the issue from the Groovy side only remains unclear until further investigation.
Basically if you split this:
def x = 3
x = 3
at the AST transform level, Groovy makes certain assumptions about how the
variable _expression_ for x on the second line should look and whether node metadata
for things like inferred type should be copied into the new node. Those assumptions
are more important in Groovy 2.5. We'll have to look into what the expanded AST for
the Spock 'where:' clause looks like in more detail.
The other possibility is that on the Groovy side we haven't created a new node
somewhere that we need to because while something might seem the same
at one point, it isn't the same and needs its own (different) metadata further
in the processing.
I can look at this in a couple of weeks but I head off on a cruise after gr8conf
and won't have connectivity for most of it. So, if someone else wants to take
a look, that would be great.