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

   
`MethodReferenceTest$NativeMethodReferenceBytecodeTest.testPrivateConstructorOfNestedClassIsCalledDirectlyFromClosureOrLambda`
 fails when the tests run with `-Pgroovy.target.closure.pack=true`, with 
`method ctorRef$doCall$0 not found`. The test inspects the generated classes 
`C$_inClosure_closure1` and `C$_inLambda_lambda2` by name. With packing on, the 
closure is hoisted into `C` and the lambda class is renamed to 
`C$_inLambda_lambda1`. The packed code is correct; only the class names the 
test expects are gone.
   
   The test's class `C` is now annotated with `@PackedClosures(mode = 
PackMode.DISABLED)`. The test checks the method-reference helper inside a 
closure class and a lambda class, and the annotation keeps that shape whether 
or not the flag is set.
   
   The other tests in `groovy.transform.stc.*` and 
`org.codehaus.groovy.classgen.asm.sc.*` that fail only with the flag are 
behaviour differences with their own issues (#3175 and two more to follow).
   
   ## Tests
   
   `MethodReferenceTest*` fails with the flag before this change (1 of 165) and 
passes with and without the flag after it. The Checkstyle and CodeNarc gates 
pass.
   


-- 
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