Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.5.4
-
None
-
None
Description
Create and compile java interface containing static method using JDK8
public interface JavaInterface { static int doSmth() { return 42; } }
javac JavaInterface.java
Open groovyConsole (2.5.4), add folder where JavaInterface.class is located to classpath, check 'Enable indy compilation' and paste following script
import groovy.transform.CompileStatic import static JavaInterface.doSmth @CompileStatic void doCall() { println doSmth() }
Compile and Run the script in groovyConsole. The result is JVM verification failure:
java.lang.VerifyError: Illegal type at constant pool entry 51 in class Caller Exception Details: Location: Caller.doCall()V @4: invokestatic Reason: Constant pool index 51 is invalid
Best Regards
Artsiom
Attachments
Attachments
Issue Links
- is cloned by
-
GROOVY-9309 Allow targetBytecode to be set for GROOVY 2.4.x versions
- Closed
- links to