codeconsole commented on PR #3289: URL: https://github.com/apache/groovy/pull/3289#issuecomment-7002766606
@daniellansun 2ceac52315 applies the rule to the field initializer and both property writes. c8391e2d75 fixes a case that 2ceac52315 opened: a property write to a `Map<String, Class<String>>` (`m.k = 'java.lang.String'`) type-checked but stored the `String` unconverted, because the map-value conversion still applied the generic check. The value is now converted, as it is for a raw `Map<String, Class>`, and `m['k'] = 'java.lang.String'` is converted the same way. `Class<?>` to `Class<? extends CharSequence>` stays an error for a variable, a field initializer, both property writes and a map write, and the test covers each. All three commits cherry-pick cleanly onto GROOVY_6_0_X, where `STCAssignmentTest`, `AssignmentsStaticCompileTest` and `Groovy12535` pass. The `<T extends Class<? extends CharSequence>>` case is unchanged here. The Lint gate failure on 2ceac52315 was `Groovy12720.groovy` on master, fixed there in 687ae270ad. @paulk-asert for the bundle: this is what `grails-web-databinding` (`AbstractStructuredBindingEditor`) needs on GROOVY_6_0_X, alongside #3285, #3286 and #3290. -- 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]
