paulk-asert commented on PR #2199: URL: https://github.com/apache/groovy/pull/2199#issuecomment-2812980365
> Can you explain the design of this one? I don't quite follow. I think this plays into the reason we limited the previous fix to STC. This just applies the previous fix (so only STC) to Switch Expressions as well as Switch Statements. The ClassCodeExpressionTransformer for the previous fix doesn't normally traverse deeply. We "create" a Switch Expression by wrapping a Switch Statement into a Closure. The change here just causes it to traverse deeper into the wrapped code. I did try adding some additional marker metadata to make traversal even more selective, but it was transformed away before it gets to where we'd look it up. We could try to track down where that happens and make it preserve the metadata, but looking inside for the Closure expression should eliminate many traversal paths. -- 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: notifications-unsubscr...@groovy.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org