I created this: https://issues.apache.org/jira/browse/GROOVY-8617
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 into this: def x 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. Cheers, Paul. On Thu, May 31, 2018 at 10:09 AM, Daniel.Sun <sun...@apache.org> wrote: > You have better to submit a JIRA issue to track it. The issue is critical > IMO... > > Cheers, > Daniel.Sun > > > > > -- > Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html >