paulk-asert commented on PR #3013: URL: https://github.com/apache/groovy/pull/3013#issuecomment-6390405453
Thanks Daniel. 1. Checked: #3000 and #3013 merge without conflict. The constant-key guard from #3000 ends up in the literal-map setProperties here, so literal keys keep the direct setter. Groovy12456, ConstructorsSTCTest and StaticCompileConstructorsTest all pass on the merged tree. 2. Agreed: for a non-literal map the entries are only known at runtime, so an unknown key is a MissingPropertyException at runtime, as in dynamic Groovy (covered by the bad-key test). 4. A null key NPEs identically in dynamic mode: MetaClassImpl.setProperties also calls entry.getKey().toString(). 5. Confirmed: STC only uses the synthetic map constructor when no declared constructor accepts the arguments, and the transformer still falls back for a declared target. A class with both C() and C(Map) uses the declared C(Map) under SC, as it does dynamically. -- 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]
