Bug 23465 – Invalid token error points to wrong line

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-11-06T13:32:57Z
Last change time
2022-11-06T22:45:54Z
Keywords
diagnostic, pull
Assigned to
No Owner
Creator
Dennis

Comments

Comment #0 by dkorpel — 2022-11-06T13:32:57Z
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, ]; ```
Comment #1 by dlang-bot — 2022-11-06T13:36:09Z
@dkorpel created dlang/dmd pull request #14624 "Fix 23465 - Invalid token error points to wrong line" fixing this issue: - Fix 23465 - Invalid token error points to wrong line https://github.com/dlang/dmd/pull/14624
Comment #2 by dlang-bot — 2022-11-06T22:45:54Z
dlang/dmd pull request #14624 "Fix 23465 - Invalid token error points to wrong line" was merged into master: - a93dc3f53aa1ceb4beb06d0225568a55f8e9aec1 by Dennis Korpel: Fix 23465 - Invalid token error points to wrong line https://github.com/dlang/dmd/pull/14624