Type parameters are not available to static members (except in traits).
class C {
private /*static*/ final Closure noOpClosure = { T v -> return v }
}
You can use Closure.IDENTITY for this specific case.
From: James Daugherty
Sent: Friday, April 11, 2025 12:43
Thank you Paul.
On Fri, Apr 11, 2025 at 10:03 PM Paul King wrote:
> Git bisect shows it as the following commit causing the change in behavior:
>
> https://github.com/apache/groovy/commit/09247dd06d
>
> None of the mentioned issues have 3.0.23 added to the fix version, so
> they don't appear in
Git bisect shows it as the following commit causing the change in behavior:
https://github.com/apache/groovy/commit/09247dd06d
None of the mentioned issues have 3.0.23 added to the fix version, so
they don't appear in the 3.0.23 release notes, but maybe it wasn't the
whole fix that was backported