codeconsole opened a new pull request, #3369:
URL: https://github.com/apache/groovy/pull/3369

   Javadoc only. `CompilerConfiguration.CLOSURE_PACKING` and `@PackedClosures` 
say the `groovy.target.closure.pack` flag packs provably-safe `@CompileStatic` 
closures. With the flag set, a dynamically compiled closure whose body has no 
free name is packed too:
   
   ```groovy
   class Dyn {
       static void main(String[] args) {
           Closure c = { String s -> s.length() }
           println c.getClass().name      // 
org.codehaus.groovy.runtime.PackedClosure$Fixed1 with the flag
       }
   }
   ```
   
   That is intended (`ClosureWriter#isPackTriggered`, the GROOVY-12151 
syntactic path; 
`ClosurePackCapabilityTest#dynamicDelegateIndependentClosuresAutoPackBySyntax` 
asserts it), so the two public Javadocs now state both subsets: under 
`@CompileStatic`, closures the type checker resolved without a delegate; under 
dynamic compilation, closures whose body has no free name.
   
   Not changed: the first sentence of the Javadoc of 
`ClosureWriter#isPackTriggered` and the class comment of 
`ClosurePackCapabilityTest` say the same outdated thing.
   
   https://issues.apache.org/jira/browse/GROOVY-12841
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to