Nothing crash

Mark Mahieu mark at twistedbanana.demon.co.uk
Thu May 22 16:39:42 PDT 2008


javac falls over trying to deal with this nonsense:


public class NothingCrash {
	
	public static void main(String[] args) {
		System.out.println(nowt().toString());
	}
		
	static Nothing nowt() {
		throw new RuntimeException();
	}
}


java.lang.AssertionError
         at com.sun.tools.javac.jvm.Code.postop(Code.java:380)
         at com.sun.tools.javac.jvm.Code.emitop0(Code.java:862)
         at com.sun.tools.javac.jvm.Gen.visitApply(Gen.java:1712)
         at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept 
(JCTree.java:1395)
         at com.sun.tools.javac.jvm.Gen.genExpr(Gen.java:837)
         at com.sun.tools.javac.jvm.Gen.visitSelect(Gen.java:2159)
         at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept 
(JCTree.java:1945)
         at com.sun.tools.javac.jvm.Gen.genExpr(Gen.java:837)
         at com.sun.tools.javac.jvm.Gen.visitApply(Gen.java:1702)
         at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept 
(JCTree.java:1395)
         at com.sun.tools.javac.jvm.Gen.genExpr(Gen.java:837)
         at com.sun.tools.javac.jvm.Gen.genArgs(Gen.java:862)
         at com.sun.tools.javac.jvm.Gen.visitApply(Gen.java:1706)
         at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept 
(JCTree.java:1395)
         ...


Regards,

Mark




More information about the closures-dev mailing list