I built the x10 compiler from trunk today (7/19) and used it to compile the
attached piece of code. The code implements a class that is parameterized by
a type that implements the Reducible interface. But, there are problems when
using the reducer in the finish statement. I've attached the error messages
that I get from the compiler. Could any one help me in fixing my program?
Reduction.x10:11: The reducer must be of type Reducible[T], for some type T.    
         Reducer: getT()    
         Reducer type: T
Reduction.x10:11: Cannot get MethodDef before type-checking method invocation.
2 errors.
Exception in thread "main" polyglot.util.InternalCompilerError: 
Reduction.x10:11,29-34: Cannot get MethodDef before type-checking method 
invocation.
        at polyglot.types.ErrorRef_c.get(ErrorRef_c.java:18)
        at polyglot.types.Use_c.def(Use_c.java:14)
        at 
polyglot.types.ProcedureInstance_c.throwTypes(ProcedureInstance_c.java:37)
        at polyglot.ast.Call_c.throwTypes(Call_c.java:399)
        at polyglot.ast.JL_c.throwTypes(JL_c.java:227)
        at polyglot.visit.CFGBuilder.visitThrow(CFGBuilder.java:398)
        at polyglot.visit.CFGBuilder.visitCFG(CFGBuilder.java:394)
        at polyglot.visit.CFGBuilder.visitCFG(CFGBuilder.java:288)
        at polyglot.visit.CFGBuilder.visitCFG(CFGBuilder.java:277)
        at x10.ast.FinishExpr_c.acceptCFG(FinishExpr_c.java:66)
        at polyglot.visit.CFGBuilder.visitCFG(CFGBuilder.java:387)
        at polyglot.visit.CFGBuilder.visitCFG(CFGBuilder.java:288)
        at polyglot.visit.CFGBuilder.visitCFG(CFGBuilder.java:277)
        at polyglot.ast.LocalDecl_c.acceptCFG(LocalDecl_c.java:305)
        at polyglot.visit.CFGBuilder.visitCFG(CFGBuilder.java:387)
        at polyglot.visit.CFGBuilder.visitCFG(CFGBuilder.java:288)
        at polyglot.visit.CFGBuilder.visitCFG(CFGBuilder.java:277)
        at polyglot.visit.CFGBuilder.visitCFGList(CFGBuilder.java:255)
        at polyglot.ast.AbstractBlock_c.acceptCFG(AbstractBlock_c.java:102)
        at polyglot.visit.CFGBuilder.visitCFG(CFGBuilder.java:387)
        at polyglot.visit.CFGBuilder.visitCFG(CFGBuilder.java:288)
        at polyglot.visit.CFGBuilder.visitCFG(CFGBuilder.java:277)
        at polyglot.ast.MethodDecl_c.acceptCFG(MethodDecl_c.java:432)
        at polyglot.visit.CFGBuilder.visitCFG(CFGBuilder.java:387)
        at polyglot.visit.CFGBuilder.visitGraph(CFGBuilder.java:236)
        at polyglot.visit.DataFlow.dataflow(DataFlow.java:431)
        at polyglot.visit.DataFlow.enterCall(DataFlow.java:713)
        at 
polyglot.visit.ErrorHandlingVisitor.enterCall(ErrorHandlingVisitor.java:103)
        at 
polyglot.visit.ErrorHandlingVisitor.enter(ErrorHandlingVisitor.java:191)
        at polyglot.visit.NodeVisitor.visitEdgeNoOverride(NodeVisitor.java:245)
        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:235)
        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.visitChildren(ClassDecl_c.java:156)
        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:235)
        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.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)

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to