Groovy Closures and Java Functional Interfaces: Does SAM Coercion Preserve Delegate-Based Method Resolution?
When a Groovy closure is exposed to Java code through a functional interface such as java.util.function.Function or Consumer , the conversion can be performed with the as operator or under @CompileStatic . The resulting Java SAM type hides the closure’s Groovy-specific owner and delegate properties from the Java caller, but it is unclear whether the underlyi