paulk-asert commented on PR #3000:
URL: https://github.com/apache/groovy/pull/3000#issuecomment-6390287094
Thanks Daniel.
1. User-written dynamic keys are still rejected by STC ("Dynamic keys in
map-style constructors are unsupported in static type checking") before this
transformer runs. Only generated keys get past that check, because
addStaticTypeError skips nodes without a source position. Those now use the
normal dynamic property set: the bytecode calls the generated key (so Spock's
recording still happens), casts it to String and uses
ScriptBytecodeAdapter.setGroovyObjectProperty, rather than borrowing the key's
method target.
2. Checked: #3000 and #3013 merge without conflict. The constant-key guard
ends up in #3013's literal-map setProperties, and its non-literal path doesn't
use per-entry targets. Groovy12456, ConstructorsSTCTest and
StaticCompileConstructorsTest all pass on the merged tree.
3. The inner-class form goes through the same entry loop, so I've left the
test focused on the reported failure.
--
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]