jdaugherty commented on PR #3082: URL: https://github.com/apache/groovy/pull/3082#issuecomment-6592858556
Thanks. Added your test, and the property cases as a parameterized test over `def log`, `static log` and `String log`, each also checking that the call uses `Sub.log`. All of them fail on master and pass with the fix. One small correction to the reasoning: the test compares the class files and never runs `Sub`, so if the guard were bound to the superclass's field it would fail on the missing `IFEQ` rather than on `String` lacking `isLoggable`. Confirmed the joint-compilation case: on master, every explicitly declared `log` in the superclass drops the guard in both compilations, so `together == separate` holds there and the `IFEQ` assertion is what catches it. Only a `@Log` superclass compiled in the same run differs, since its field does not exist yet when the subclass is scoped. I have reworded the commit message and description accordingly and widened the javadoc on `refersToLogField`. The backport branch is updated to match. -- 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]
