[ 
https://issues.apache.org/jira/browse/GROOVY-9655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17171672#comment-17171672
 ] 

Eric Milles edited comment on GROOVY-9655 at 8/5/20, 6:26 PM:
--------------------------------------------------------------

[~leonard84] I have no plans for additional changes.  You can always 
disambiguate any variable expression within a closure using a "delegate", 
"owner", "this"/"thisObject" or "Type" qualifier (depending on the needs of the 
situation).  Map-based types have some very special behaviors when it comes to 
resolution of fields, methods and properties.

For reference, this is the change that altered the search for static outer 
fields: GROOVY-9569: 
https://github.com/apache/groovy/commit/5a0426a85a82dd1f3ee984294788ef70ab87d486


was (Author: emilles):
[~leonard84] I have no plans for additional changes.  You can always 
disambiguate any variable expression with a "delegate", "owner", 
"this"/"thisObject" or "Type" qualifier (depending on the needs of the 
situation).  Map-based types have some very special behaviors when it comes to 
resolution of fields, methods and properties.

For reference, this is the change that altered the search for static outer 
fields: GROOVY-9569: 
https://github.com/apache/groovy/commit/5a0426a85a82dd1f3ee984294788ef70ab87d486

> Groovy 3.0.5 regression with the "with" keyword
> -----------------------------------------------
>
>                 Key: GROOVY-9655
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9655
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 3.0.5, 2.5.13
>            Reporter: Henrik
>            Assignee: Eric Milles
>            Priority: Critical
>              Labels: regression
>
> Since GROOVY-7701 was the only issue relating to {{with}} in Groovy 3.0.5, I 
> think that fix might have broken behaviour in Spock (using 2.0-M3):
> This works in 3.0.4:
> {code:java}
> static BOOKING = 123
> def 'get stuff'() {
>   given:
>   def stuff = [ booking: 123 ]
>   expect:
>     with(stuff) {
>       booking == BOOKING
>     }
>  }
> {code}
> But fails in 3.0.5 with:
> {code:java}
> Condition not satisfied:
> booking == BOOKING
> |       |  |
> 123     |  null
>         false
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to