eric-milles commented on pull request #1359:
URL: https://github.com/apache/groovy/pull/1359#issuecomment-687267811
So the issue is somewhere in the anon. inner class created for `Function<C,
String>`. When I replace it with closure coercion, I don't get the error. I
don't know that this problem didn't exist before these changes.
```groovy
@groovy.transform.CompileStatic
Function<C, String> func() {
/*
new Function<C, String>() {
@Override
String apply(C that) {
return 'foo'
}
}
*/
{ that -> 'foo' } as Function<C, String>
}
```
Here is the error I get. Any idea what "invariant" refers to? Is this
coming from the contracts module integration?
```
java.lang.VerifyError: Bad type on operand stack
Exception Details:
Location:
ConsoleScript14$1.invariant_ConsoleScript14$1()V @55: invokevirtual
Reason:
Type 'ConsoleScript14' (current frame, stack[0]) is not assignable to
'java/lang/Boolean'
```
Any idea why I get this error when creating a full distribution and running
within Groovy Console and not when running via GroovyShell through the unit
tests?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]