X10
  1. X10
  2. XTENLANG-1205

Lots of warnings in checking types with recursively defined constraints

    Details

    • Number of attachments :
      0

      Description

      After displaying the following error message, an infinite (or deep) recursive call of X10Context_c.constraintProjection occurred when compiling RefA.x10.

      RefA.x10:15: Cannot access a non-static field or method, or refer to "this" or "super" from a static context.

      Exception stack trace is:
      (omitted)
      at x10.types.X10Context_c.constraintProjection(X10Context_c.java:207)
      at x10.types.X10Context_c.constraintProjection(X10Context_c.java:258)
      at x10.types.X10Context_c.constraintProjection(X10Context_c.java:246)
      at x10.types.X10Context_c.constraintProjection(X10Context_c.java:270)
      at x10.types.X10Context_c.constraintProjection(X10Context_c.java:207)
      at x10.types.X10Context_c.constraintProjection(X10Context_c.java:258)
      at x10.types.X10Context_c.constraintProjection(X10Context_c.java:246)
      at x10.types.X10Context_c.constraintProjection(X10Context_c.java:270)
      at x10.types.X10Context_c.constraintProjection(X10Context_c.java:207)
      at x10.types.X10Context_c.constraintProjection(X10Context_c.java:258)
      at x10.types.X10Context_c.constraintProjection(X10Context_c.java:246)
      at x10.types.X10Context_c.constraintProjection(X10Context_c.java:270)
      at x10.types.X10Context_c.constraintProjection(X10Context_c.java:207)
      at x10.types.X10Context_c.constraintProjection(X10Context_c.java:258)
      at x10.types.X10Context_c.constraintProjection(X10Context_c.java:270)
      at x10.types.X10Context_c.constraintProjection(X10Context_c.java:207)
      at x10.types.X10Context_c.constraintProjection(X10Context_c.java:173)
      at x10.types.X10TypeEnv_c.entails(X10TypeEnv_c.java:1169)
      at x10.types.X10TypeEnv_c.typeEquals(X10TypeEnv_c.java:1039)
      at x10.types.X10TypeEnv_c.isSubtype(X10TypeEnv_c.java:737)
      at x10.types.X10TypeEnv_c.isSubtype(X10TypeEnv_c.java:672)
      at x10.types.X10TypeSystem_c.isSubtype(X10TypeSystem_c.java:2208)
      at x10.types.checker.Converter.attemptCoercion(Converter.java:96)
      at x10.ast.X10Return_c.typeCheck(X10Return_c.java:206)
      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:101)
      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.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:123)
      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.X10MethodDecl_c.typeCheckOverride(X10MethodDecl_c.java:933)
      at polyglot.ast.JL_c.typeCheckOverride(JL_c.java:161)
      at x10.visit.X10TypeChecker.override(X10TypeChecker.java:53)
      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:123)
      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:642)
      at polyglot.ast.JL_c.typeCheckOverride(JL_c.java:161)
      at x10.visit.X10TypeChecker.override(X10TypeChecker.java:53)
      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:123)
      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.VisitorGoal.runTask(VisitorGoal.java:45)
      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.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)

        Issue Links

          Activity

          Hide
          David Grove added a comment -

          defer all non-critical X10 issues to 2.1.0.

          Show
          David Grove added a comment - defer all non-critical X10 issues to 2.1.0.
          Hide
          Igor Peshansky added a comment -

          Bulk defer all non-critical, non-blocker frontend issues to 2.1.0.

          Show
          Igor Peshansky added a comment - Bulk defer all non-critical, non-blocker frontend issues to 2.1.0.
          Hide
          Yoav Zibin added a comment -

          still happens on that code:

          class RefA_MustFailCompile(f0: RefB{self.f2.f1==this.f1}, f1:int) {
          	public def this(f0_: RefB{self.f2.f1==f1}, f1_: int) { 
                          property(f0_, f1_);
          	}
          }
          class RefB(f2: RefA_MustFailCompile) {
          	public def this(f2: RefA_MustFailCompile) { 
          		property(f2);
          	}	
          }
          
          Show
          Yoav Zibin added a comment - still happens on that code: class RefA_MustFailCompile(f0: RefB{self.f2.f1== this .f1}, f1: int ) { public def this (f0_: RefB{self.f2.f1==f1}, f1_: int ) { property(f0_, f1_); } } class RefB(f2: RefA_MustFailCompile) { public def this (f2: RefA_MustFailCompile) { property(f2); } }
          Hide
          Igor Peshansky added a comment -

          This program no longer crashes with a StackOverflowError, but instead produces lots of warnings, in the same way as XTENLANG-1889.

          Show
          Igor Peshansky added a comment - This program no longer crashes with a StackOverflowError, but instead produces lots of warnings, in the same way as XTENLANG-1889 .
          Hide
          David Grove added a comment -

          bulk defer of unresolved 2.1.0 bugs to 2.1.1.

          Show
          David Grove added a comment - bulk defer of unresolved 2.1.0 bugs to 2.1.1.
          Hide
          David Grove added a comment -

          bulk move of all unresolved issues from 2.1.1 to 2.1.2

          Show
          David Grove added a comment - bulk move of all unresolved issues from 2.1.1 to 2.1.2
          Hide
          David Grove added a comment -

          defer all non-critical 2.1.2 issues to 2.2.

          Show
          David Grove added a comment - defer all non-critical 2.1.2 issues to 2.2.
          Hide
          David Grove added a comment -

          bulk defer of open issues to 2.2.2.

          Show
          David Grove added a comment - bulk defer of open issues to 2.2.2.
          Hide
          David Grove added a comment -

          bulk defer of issues to 2.2.3.

          Show
          David Grove added a comment - bulk defer of issues to 2.2.3.
          Hide
          David Grove added a comment -

          bulk defer of 2.3.0 open issues to 2.3.1.

          Show
          David Grove added a comment - bulk defer of 2.3.0 open issues to 2.3.1.
          Hide
          David Grove added a comment -

          bulk defer to 2.3.2

          Show
          David Grove added a comment - bulk defer to 2.3.2
          Hide
          David Grove added a comment -

          bulk defer to 2.4.1.

          Show
          David Grove added a comment - bulk defer to 2.4.1.
          Hide
          David Grove added a comment -

          bulk defer to 2.4.2

          Show
          David Grove added a comment - bulk defer to 2.4.2
          Hide
          David Grove added a comment -

          bulk defer to 2.4.3

          Show
          David Grove added a comment - bulk defer to 2.4.3
          Hide
          David Grove added a comment -

          bulk defer to 2.4.4

          Show
          David Grove added a comment - bulk defer to 2.4.4
          Hide
          David Grove added a comment -

          bulk defer to 2.5.2

          Show
          David Grove added a comment - bulk defer to 2.5.2

            People

            • Assignee:
              Vijay Saraswat
              Reporter:
              Mikio Takeuchi
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: