[ https://issues.apache.org/jira/browse/GROOVY-10187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles closed GROOVY-10187. -------------------------------- Resolution: Duplicate > Different treatment of closure parameters from 2.4 to 2.5 > --------------------------------------------------------- > > Key: GROOVY-10187 > URL: https://issues.apache.org/jira/browse/GROOVY-10187 > Project: Groovy > Issue Type: Question > Components: Compiler > Affects Versions: 2.5.14 > Reporter: Darius Cooper > Priority: Major > > We noticed a change in behavior moving from Groovy 2.4.x to 2.5.x, > and wondering if it was an _expected_ change. It seems to be a difference > with the compiler > We use *groovy-eclipse-batch*. > This is a contrived example, but based on an issue we had in PROD > List<Integer> myList = [1,2,3] > myList.each \{ Integer -> println Integer.xxx} > With groovy-eclipse-batch 2.4.17-01 (and groovy 2.4.15) we get errors saying: > _No such property: xxx for class: java.lang.Integer_ > However, using groovy-eclipse-batch 2.5.14-02 and Groovy 2.5.14, it prints > out the full class name of the Integer class > From this Slack thread: If you look in the AST browser, *after conversion > phase* we have: > {code:java} > public java.lang.Object run() { > List<Integer> myList = [1, 2, 3] > myList.each({ java.lang.Object Integer -> > this.println( Integer .xxx) > }) > } > {code} > By *end of semantic analysis phase* we have: > {code:java} > public java.lang.Object run() { > List<Integer> myList = [1, 2, 3] > myList.each({ java.lang.Object Integer -> > this.println( java.lang.Integer) > }) > }{code} > -- This message was sent by Atlassian Jira (v8.3.4#803005)