ceylon / ceylon-module-resolver

DEPRECATED
Apache License 2.0
23 stars 9 forks source link

Compiler NPE on invalid statement #62

Closed akberc closed 11 years ago

akberc commented 11 years ago

Probably an invalid statement, but a compiler backend NPE:

[ceylon-compile] /....ns.ceylon:240: error: Uncaught exception during code generation: java.lang.NullPointerException
[ceylon-compile]            return { *someMap.get(lf)?.someValue };
[ceylon-compile]            ^
[ceylon-compile] java.lang.NullPointerException
[ceylon-compile]    at com.redhat.ceylon.compiler.typechecker.model.ProducedType.isExactly(ProducedType.java:49)
[ceylon-compile]    at com.redhat.ceylon.compiler.java.codegen.ExpressionTransformer.needsCast(ExpressionTransformer.java:508)
[ceylon-compile]    at com.redhat.ceylon.compiler.java.codegen.ExpressionTransformer.needsCast(ExpressionTransformer.java:595)
[ceylon-compile]    at com.redhat.ceylon.compiler.java.codegen.ExpressionTransformer.applyErasureAndBoxing(ExpressionTransformer.java:441)
[ceylon-compile]    at com.redhat.ceylon.compiler.java.codegen.ExpressionTransformer.applyErasureAndBoxing(ExpressionTransformer.java:396)
[ceylon-compile]    at com.redhat.ceylon.compiler.java.codegen.ExpressionTransformer.transformExpression(ExpressionTransformer.java:338)
[ceylon-compile]    at com.redhat.ceylon.compiler.java.codegen.ExpressionTransformer.transformExpression(ExpressionTransformer.java:287)
[ceylon-compile]    at com.redhat.ceylon.compiler.java.codegen.AbstractTransformer.makeIterable(AbstractTransformer.java:2441)
[ceylon-compile]    at com.redhat.ceylon.compiler.java.codegen.ExpressionTransformer.transform(ExpressionTransformer.java:1190)
[ceylon-compile]    at com.redhat.ceylon.compiler.java.codegen.ExpressionTransformer.transformExpression(ExpressionTransformer.java:312)
[ceylon-compile]    at com.redhat.ceylon.compiler.java.codegen.ExpressionTransformer.transformExpression(ExpressionTransformer.java:287)
[ceylon-compile]    at com.redhat.ceylon.compiler.java.codegen.ExpressionTransformer.transformExpression(ExpressionTransformer.java:264)
[ceylon-compile]    at com.redhat.ceylon.compiler.java.codegen.StatementTransformer.transform(StatementTransformer.java:1951)
[ceylon-compile]    at com.redhat.ceylon.compiler.java.codegen.CeylonVisitor.visit(CeylonVisitor.java:264)
[ceylon-compile]    at com.redhat.ceylon.compiler.typechecker.tree.Tree$Return.visit(Tree.java:2456)
[ceylon-compile]    at com.redhat.ceylon.compiler.java.codegen.StatementTransformer.transformStmts(StatementTransformer.java:153)
[ceylon-compile]    at com.redhat.ceylon.compiler.java.codegen.StatementTransformer$ForStatementTransformation.transformForClause(StatementTransformer.java:1437)
[ceylon-compile]    at com.redhat.ceylon.compiler.java.codegen.StatementTransformer$ForStatementTransformation.transform(StatementTransformer.java:1335)
[ceylon-compile]    at com.redhat.ceylon.compiler.java.codegen.StatementTransformer.transform(StatementTransformer.java:1178)
[ceylon-compile]    at com.redhat.ceylon.compiler.java.codegen.CeylonVisitor.visit(CeylonVisitor.java:280)
akberc commented 11 years ago

Belongs in compiler - sorry.