www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 23465] New: Invalid token error points to wrong line

https://issues.dlang.org/show_bug.cgi?id=23465

          Issue ID: 23465
           Summary: Invalid token error points to wrong line
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: diagnostic
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: dkorpel live.nl

I had a big array literal with accidentally an invalid token in the middle of
it, but the error message points to the start of the array literal `[`, which
makes it hard to find.

```
int[] arr = 
[         // error points to here
    0,
    1,
    2,
    3,\   // actual error here
    5,
];
```

--
Nov 06 2022