VerifyError: Wrong return type in function

Mark Mahieu mark at
Wed Aug 6 02:20:05 PDT 2008

FYI, the following code (all in one compilation unit) compiles but  
fails with a VerifyError when run.  The test case is about as simple  
as I could make it...

public class TriggerVerifyError {
     public static void main(String[] args) {
         new Foo() {}.run();

class Foo {
     void run() {
         {=> String} fn =
                 String s = null;

Exception in thread "main" java.lang.VerifyError: (class: Foo$2,  
method: invoke signature: ()Ljava/lang/String;) Wrong return type in  
         at Foo.<clinit>(
         at TriggerVerifyError.main(



More information about the closures-dev mailing list