Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0-JSR-5
-
None
Description
> ----
> class Bla
> println new Bla()
> ----
> throws NPE.
It's probably helpful to say that it causes an NPE in the compiler:
Caught: java.lang.NullPointerException
java.lang.NullPointerException
at org.codehaus.groovy.ast.ClassNode.equals(ClassNode.java:540)
at org.codehaus.groovy.ast.ClassNode.equals(ClassNode.java:538)
at org.codehaus.groovy.classgen.AsmClassGenerator.doConvertAndCast
(AsmClassGenerator.java:993)
at org.codehaus.groovy.classgen.AsmClassGenerator.visitCastExpression
(AsmClassGenerator.java:1429)
at org.codehaus.groovy.classgen.AsmClassGenerator.evaluateEqual
(AsmClassGenerator.java:2812)
at
org.codehaus.groovy.classgen.AsmClassGenerator.visitBinaryExpression
(AsmClassGenerator.java:1055)
at org.codehaus.groovy.ast.expr.BinaryExpression.visit
(BinaryExpression.java:79)
at
org.codehaus.groovy.classgen.AsmClassGenerator.visitAndAutoboxBoolean
(AsmClassGenerator.java:2876)
at
org.codehaus.groovy.classgen.AsmClassGenerator.visitExpressionStatement(
AsmClassGenerator.java:1021)
at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit
(ExpressionStatement.java:70)
at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement
(CodeVisitorSupport.java:165)
at
org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement
(ClassCodeVisitorSupport.java:93)
at org.codehaus.groovy.classgen.AsmClassGenerator.visitBlockStatement
(AsmClassGenerator.java:465)
at org.codehaus.groovy.ast.stmt.BlockStatement.visit
(BlockStatement.java:82)