Incorrect Line Numbers Reported
See original GitHub issueI am using Meriyah with GraalVM to validate Javascript source in my code editor. I am using the version from the dev
branch from commit 96eb15f, dated 2019-08-21.
Given the code:
...
108 handleAddressSelected : function(adr) {
109 var prp this.props;
110
111 // Address selection puts the entire address into the target field value so address1 must always be changed.
112 // e.g.: 6/19 Ashby Circuit, Kamhah ACT, Australia
113
114 if(adr.postcode!=prp.adrPostcode || adr.state!=prp.adrState) {
115 this.handleAddressChanged(prp.address1);
116 }
117 else if(sta.showAddressLine2) {
118 this.handleAddressChanged(adr.street,adr.unit,adr.name,adr.citySuburb);
119 }
120 else {
121 this.handleAddressChanged((adr.unit ? adr.unit+"/" : "")+adr.street,"",adr.name,adr.citySuburb);
122 }
123 },
The line reported from Meriyah for the error is:
ERROR : C:/[...deleted...]/Contact.js:~: [121:45]: Unexpected token: 'this'
Which was immensely difficult to figure out.
After a long time I noticed the missing =
at line 109. Then I used the browser to locate the error and it pointed to the this
at line 109 also. Obviously this was made much more difficult by the fact that there was no reason to suspect the line number was incorrect. Since I’ve been using Meriyah for a while, I suspect that this was introduced in the last few weeks.
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (13 by maintainers)
Top Results From Across the Web
Incorrect line numbers reported for some test combinations
If I run all but one test, or that one test on its own, the correct line numbers are shown. If I run...
Read more >Why this snippet is giving me incorrect line numbers?
I throw an error, and I noticed both Stackoverflow and JSFiddle giving me incorrect line numbers on stack-trace.
Read more >Incorrect line numbers reported in traceStack of a byteman rule?
I am using Byteman in investigating some resource leaks within a project. Am currently using the latest released 3.0.10 version of Byteman.
Read more >Excel spreadsheet has incorrect line numbers
All of a sudden the LINE NUMBERS (far left column) are incorrect (out of sequence). Line 56 is followed by line 63! This...
Read more >Line numbers are incorrect in exception stack trace : KT-8628
In which console exactly are you clicking the link? Line numbers greater than the number of lines in the file are expected behavior...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
No problem. Issue was very easy, and the way you investigated and described things was very helpful 😃
Thanks for working with me on this. Apologies for the misleading bit about
state |= 1 | 4;
– apparently my bit-fu is rusty.