codeconsole commented on PR #3090: URL: https://github.com/apache/groovy/pull/3090#issuecomment-7076036504
Thanks Daniel. Master is merged in 3090824. #3089 landed squashed as ad1832f, which matches the #3089 tip 41eb183 in every file it touches, so the branch now has 5d3c725 (the `groovy.target.lambda.typearg` gate) and 41eb183 (`list << String::trim`). It also has f1cf705 and e3b8697: the full `:test` suite passes locally and the lint gate is green. The operator conflict needed more than a union of the two sides. This branch converts an operand of type `Closure` like an argument, and a lambda has that type. Without the option, `list << (() -> 'x')` was still compiled for the interface, and #3089's `testLambdaIsCompiledAsAClosureWithoutTheOption` failed. That check now leaves lambdas to `isFunctionalLiteral`, so a lambda for a type-parameter slot is compiled as a closure by default everywhere, as on master. fba3a94 fixes a false warning from this branch. A lambda or method reference assigned to a subscript, property or field, such as `map['k'] = (String s) -> s`, is compiled for the interface, but it was also warned about as a Closure stored as it is. Only closures are converted at those assignments now, and a test covers it with the option on and off. -- 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]
