paulk-asert opened a new pull request, #3076: URL: https://github.com/apache/groovy/pull/3076
When a trait came from a class file, Traits.findHelpers loaded its helper classes through the class loader and built their ClassNodes by reflection. Every other classpath type is read from its class file instead. Loading and reflecting had two effects: - An incremental compile failed with NoClassDefFoundError when a helper referred to a class whose class file had been removed so it could be recompiled. - Annotations copied from trait methods to an implementer were written with all their default members, because reflection reports defaults. An implementer of a pre-compiled trait therefore compiled to different bytecode than when the trait was in the same compilation unit. Resolve the helpers of a trait read from bytecode through that trait's own reference resolver, so they are read from their class files too. Traits that were loaded as classes keep the old lookup. -- 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]
