The GitHub Actions job "Code Style" on 
grails-core.git/fix/where-query-transactional-variable-scope has succeeded.
Run started by GitHub user jamesfredley (triggered by jamesfredley).

Head commit for run:
4299a24bca7ac25df866e496c615fcb3bc7476fa / James Fredley 
<[email protected]>
fix: set implicitThis=false on delegate MethodCallExpressions in 
DetachedCriteriaTransformer

When @Transactional methods contain where queries with local variable
names matching domain property names (e.g. Book.where { title == title }),
TransactionalTransform re-runs VariableScopeVisitor on the renamed method
body. VariableScopeVisitor sees delegate.property(closure) calls with
implicitThis=true, finds a local variable with the same name in scope,
and rewrites them to variable.call(closure) - causing MissingMethodException
at runtime.

The fix sets implicitThis=false on all MethodCallExpression nodes generated
by DetachedCriteriaTransformer where the object expression is 'delegate'.
This is semantically correct since the call IS explicitly on delegate, not
implicit this, and prevents VariableScopeVisitor from rewriting the call.

Fixes #11464

Assisted-by: OpenCode <[email protected]>

Report URL: https://github.com/apache/grails-core/actions/runs/22365418306

With regards,
GitHub Actions via GitBox

Reply via email to