Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: X10 SVN HEAD
-
Component/s: X10 Compiler: Front-end Typechecking
-
Labels:None
-
Number of attachments :
Description
class stex {
static val c = Rail.make[Int](1);
def this() {
at(c)c(0)++;
}
}
explodes with:
x10c stex.x10
Exception in thread "main" java.lang.NullPointerException
at x10.types.X10Context_c.collectingFinishType(X10Context_c.java:366)
at x10.types.checker.Checker.checkOfferType(Checker.java:55)
at x10.ast.X10Call_c.typeCheck(X10Call_c.java:622)
at x10.ast.X10Call_c.typeCheck(X10Call_c.java:491)
at polyglot.ast.JL_c.typeCheck(JL_c.java:180)
at polyglot.visit.TypeChecker.leaveCall(TypeChecker.java:106)
at x10.visit.X10TypeChecker.leaveCall(X10TypeChecker.java:90)
at polyglot.visit.ErrorHandlingVisitor.leaveCall(ErrorHandlingVisitor.java:141)
at polyglot.visit.ErrorHandlingVisitor.leave(ErrorHandlingVisitor.java:279)
at polyglot.visit.ContextVisitor.leave(ContextVisitor.java:140)
at polyglot.visit.NodeVisitor.visitEdgeNoOverride(NodeVisitor.java:258)
at polyglot.visit.NodeVisitor.visitEdge(NodeVisitor.java:217)
at polyglot.ast.Node_c.visitChild(Node_c.java:179)
at polyglot.ast.Unary_c.visitChildren(Unary_c.java:73)
at polyglot.ast.JL_c.visitChildren(JL_c.java:45)
at x10.extension.X10Del_c.visitChildren(X10Del_c.java:137)
at polyglot.visit.NodeVisitor.visitEdgeNoOverride(NodeVisitor.java:251)
at polyglot.visit.NodeVisitor.visitEdge(NodeVisitor.java:217)
at polyglot.ast.Node_c.visitChild(Node_c.java:179)
at polyglot.ast.Eval_c.visitChildren(Eval_c.java:68)
at polyglot.ast.JL_c.visitChildren(JL_c.java:45)
at x10.extension.X10Del_c.visitChildren(X10Del_c.java:137)
at polyglot.visit.NodeVisitor.visitEdgeNoOverride(NodeVisitor.java:251)
at polyglot.visit.NodeVisitor.visitEdge(NodeVisitor.java:217)
at polyglot.ast.Node_c.visitChild(Node_c.java:179)
at polyglot.ast.Node_c.visitList(Node_c.java:239)
at polyglot.ast.AbstractBlock_c.visitChildren(AbstractBlock_c.java:72)
at polyglot.ast.JL_c.visitChildren(JL_c.java:45)
at x10.extension.X10Del_c.visitChildren(X10Del_c.java:137)
at polyglot.visit.NodeVisitor.visitEdgeNoOverride(NodeVisitor.java:251)
at polyglot.visit.NodeVisitor.visitEdge(NodeVisitor.java:217)
at polyglot.ast.Node_c.visitChild(Node_c.java:179)
at x10.ast.AtStmt_c.visitChildren(AtStmt_c.java:148)
at polyglot.ast.JL_c.visitChildren(JL_c.java:45)
at x10.extension.X10Del_c.visitChildren(X10Del_c.java:137)
at polyglot.visit.NodeVisitor.visitEdgeNoOverride(NodeVisitor.java:251)
at polyglot.visit.NodeVisitor.visitEdge(NodeVisitor.java:217)
at polyglot.ast.Node_c.visitChild(Node_c.java:179)
at polyglot.ast.Node_c.visitList(Node_c.java:239)
at polyglot.ast.AbstractBlock_c.visitChildren(AbstractBlock_c.java:72)
at polyglot.ast.JL_c.visitChildren(JL_c.java:45)
at x10.extension.X10Del_c.visitChildren(X10Del_c.java:137)
at polyglot.visit.NodeVisitor.visitEdgeNoOverride(NodeVisitor.java:251)
at polyglot.visit.NodeVisitor.visitEdge(NodeVisitor.java:217)
at polyglot.ast.Node_c.visitChild(Node_c.java:179)
at x10.ast.X10ConstructorDecl_c.typeCheckOverride(X10ConstructorDecl_c.java:451)
at polyglot.ast.JL_c.typeCheckOverride(JL_c.java:161)
at x10.visit.X10TypeChecker.override(X10TypeChecker.java:61)
at polyglot.visit.NodeVisitor.visitEdge(NodeVisitor.java:214)
at polyglot.ast.Node_c.visitChild(Node_c.java:179)
at polyglot.ast.Node_c.visitList(Node_c.java:239)
at polyglot.ast.ClassBody_c.visitChildren(ClassBody_c.java:63)
at polyglot.ast.JL_c.visitChildren(JL_c.java:45)
at x10.extension.X10Del_c.visitChildren(X10Del_c.java:137)
at polyglot.visit.NodeVisitor.visitEdgeNoOverride(NodeVisitor.java:251)
at polyglot.visit.NodeVisitor.visitEdge(NodeVisitor.java:217)
at polyglot.ast.Node_c.visitChild(Node_c.java:179)
at polyglot.ast.ClassDecl_c.typeCheckBody(ClassDecl_c.java:415)
at x10.ast.X10ClassDecl_c.typeCheckOverride(X10ClassDecl_c.java:643)
at polyglot.ast.JL_c.typeCheckOverride(JL_c.java:161)
at x10.visit.X10TypeChecker.override(X10TypeChecker.java:61)
at polyglot.visit.NodeVisitor.visitEdge(NodeVisitor.java:214)
at polyglot.ast.Node_c.visitChild(Node_c.java:179)
at polyglot.ast.Node_c.visitList(Node_c.java:239)
at polyglot.ast.SourceFile_c.visitChildren(SourceFile_c.java:116)
at polyglot.ast.JL_c.visitChildren(JL_c.java:45)
at x10.extension.X10Del_c.visitChildren(X10Del_c.java:137)
at polyglot.visit.NodeVisitor.visitEdgeNoOverride(NodeVisitor.java:251)
at polyglot.visit.NodeVisitor.visitEdge(NodeVisitor.java:217)
at polyglot.ast.Node_c.visit(Node_c.java:183)
at polyglot.frontend.ForgivingVisitorGoal.runTask(ForgivingVisitorGoal.java:27)
at polyglot.frontend.Scheduler.runPass(Scheduler.java:325)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:102)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:45)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:49)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:45)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:49)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:45)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:49)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:45)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:49)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:45)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:49)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:45)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:49)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:45)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:49)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:45)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:49)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:45)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:49)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:45)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:49)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:45)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:49)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:45)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:49)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:45)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:49)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:45)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:49)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:45)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:49)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:45)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:49)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:45)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:49)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:45)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:49)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:45)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:49)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:45)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:49)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:45)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:49)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:45)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:49)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:45)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:49)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:45)
at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:49)
at polyglot.types.LazyRef_c.get(LazyRef_c.java:45)
at polyglot.frontend.Scheduler.attempt(Scheduler.java:237)
at polyglot.frontend.Scheduler.runToCompletion(Scheduler.java:174)
at polyglot.frontend.Scheduler.runToCompletion(Scheduler.java:160)
at polyglot.frontend.Compiler.compile(Compiler.java:166)
at polyglot.frontend.Compiler.compileFiles(Compiler.java:134)
at polyglot.main.Main.start(Main.java:119)
at polyglot.main.Main.start(Main.java:74)
at polyglot.main.Main.main(Main.java:166)
~/x10/tmp/stat:
For what it's worth, if that were a method rather than a constructor, it wouldn't fail.
Still a bug in r14646.