Menu

#69 SomeClass s=new SomeClass; gets compiled

closed-fixed
5
2004-11-09
2004-11-05
Jos Hirth
No

Version: 2.0.14
-------------------------------------------
public class Silly2
{
public static void main(String[] args)
{
Integer i=new Integer; //duh
System.out.println(i.intValue());
}
}
-------------------------------------------
java -cp .;janino.jar net.janino.Compiler -verbose -g
-rebuild Silly2.java
-------------------------------------------

Gets compiled and if you run it a java.lang.VerifyError
Exception is thrown:

java.lang.VerifyError: (class: Silly2, method: main
signature: ([Ljava/lang/String;)V) Illegal dimension
argument
Exception in thread "main"

-------------------------------------------

Expected behaviour:

An Exception during compilation ;)

Silly2.java:5: '(' or '[' expected

(Btw I don't use a horde of monkeys for finding errors
by brute force - it's all my own stupidity ;))

Discussion

  • Arno Unkrig

    Arno Unkrig - 2004-11-09

    Logged In: YES
    user_id=865893

    The was a bug in the JANINOs Java Grammar: NewExprs must
    comprise at least ONE NewExpr.
    Will be fixed in 2.0.15.

     
  • Arno Unkrig

    Arno Unkrig - 2004-11-09
    • status: open --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB