groovy icon indicating copy to clipboard operation
groovy copied to clipboard

GROOVY-11375, GROOVY-11769: SC: lookup type of variable before target

Open eric-milles opened this issue 2 months ago • 3 comments

There may be some side effects from changing StaticTypesTypeChooser in this manner. I cannot recall exactly why this was not ported to 4.x back in June 2024.

see also GROOVY-9344, GROOVY-9607

eric-milles avatar Oct 03 '25 23:10 eric-milles

One of the related problems from Grails (see GormEntityTransformation) is this:

if (classNode instanceof InnerClassNode || classNode.isEnum())

The second occurrence of classNode gets cast to InnerClassNode due to improper or handling (see GROOVY-7971).

eric-milles avatar Oct 06 '25 20:10 eric-milles

I am happy for this to be merged but we still need to sort out GROOVY-7971. I might try to relook at that again soon.

paulk-asert avatar Oct 08 '25 07:10 paulk-asert

I'm reluctant to merge myself because GROOVY-11769 is about bytecode optimization, not failing functionality. And GROOVY-11375 was not strong enough on its own to make this change earlier.

eric-milles avatar Oct 08 '25 18:10 eric-milles