Is it expected, that under static-compilation the ...
# groovy
v
Is it expected, that under static-compilation the arguments given to a closure differ? Given
Copy code
class Foo {
  def foo() {
    { Object[] foo -> println(foo) }.call(new Object[] { 'foo' })
  }
}
new Foo().foo()
it prints
[foo]
. Adding
@groovy.transform.CompileStatic
, it prints
[[foo]]
. Removing the
Object[]
with added static-compilation it again prints
[foo]
.
I think it is a bug in the code generation: issues.apache.org/jira/browse/GROOVY-12309