X10
  1. X10
  2. XTENLANG-1841

Spurious initial error message when method body doens't parse

    Details

    • Number of attachments :
      1

      Description

      The program has a syntax error. There are missing ';' after a val declaration inside a method body. However, the front-end gets confused by this and also complains about a perfectly correct field declaration "way above" the actual errors in the input file.

      gen-xrx:
           [echo] Building Java sources for XRX
           [echo] x10c -O   -c x10/array/RectRegion.x10
           [exec] /home/dgrove/x10-trunk/x10.runtime/src-x10/x10/array/RectRegion.x10:20: Syntax error: Token(s) inserted to complete scope: "MethodBody"
           [exec]     private val size:int;
           [exec]      ^---------^
           [exec] 
           [exec] /home/dgrove/x10-trunk/x10.runtime/src-x10/x10/array/RectRegion.x10:159: Syntax error: Invalid token: "AssignmentOperator"
           [exec]            case 3: { val tmp = p(3) if (tmp<min3 || tmp>max3) return false;
           [exec]                                      ^^
           [exec] 
           [exec] /home/dgrove/x10-trunk/x10.runtime/src-x10/x10/array/RectRegion.x10:159: Syntax error: Misplaced constructs(s): "ERROR_TOKEN"
           [exec]            case 3: { val tmp = p(3) if (tmp<min3 || tmp>max3) return false;
           [exec]                     ^----------------------------------------^
           [exec] 
           [exec] /home/dgrove/x10-trunk/x10.runtime/src-x10/x10/array/RectRegion.x10:160: Syntax error: Invalid token: "AssignmentOperator"
           [exec]            case 2: { val tmp = p(2) if (tmp<min2 || tmp>max2) return false;
           [exec]                                      ^^
           [exec] 
           [exec] /home/dgrove/x10-trunk/x10.runtime/src-x10/x10/array/RectRegion.x10:160: Syntax error: Misplaced constructs(s): "ERROR_TOKEN"
           [exec]            case 2: { val tmp = p(2) if (tmp<min2 || tmp>max2) return false;
           [exec]                     ^----------------------------------------^
           [exec] 
           [exec] /home/dgrove/x10-trunk/x10.runtime/src-x10/x10/array/RectRegion.x10:161: Syntax error: Invalid token: "AssignmentOperator"
           [exec]            case 1: { val tmp = p(1) if (tmp<min1 || tmp>max1) return false;
           [exec]                                      ^^
           [exec] 
           [exec] /home/dgrove/x10-trunk/x10.runtime/src-x10/x10/array/RectRegion.x10:161: Syntax error: Misplaced constructs(s): "ERROR_TOKEN"
           [exec]            case 1: { val tmp = p(1) if (tmp<min1 || tmp>max1) return false;
           [exec]                     ^----------------------------------------^
           [exec] 
           [exec] /home/dgrove/x10-trunk/x10.runtime/src-x10/x10/array/RectRegion.x10:162: Syntax error: Misplaced constructs(s): "ERROR_TOKEN"
           [exec]            case 0: { val tmp = p(0) if (tmp<min0 || tmp>max0) return false;
           [exec]                     ^--------------^
           [exec] 
           [exec] 8 errors.
      
      

        Issue Links

          Activity

          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:
              Unassigned
              Reporter:
              David Grove
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: