Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: X10 2.3.2
-
Labels:None
-
Number of attachments :
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
- is duplicated by
-
XTENLANG-2676
Misleading and unhelpful error message when using 'b' as byte literal suffix
-
- is related to
-
XTENLANG-1814
Confusion over point deconstructing syntax leads to spurious parse error
-
-
XTENLANG-2647
'instead of this input' parse errors could be better
-
Bulk-assigning unscheduled issues to the next release.