-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong error location #3845
Comments
Thanks for the report. As best I can tell, this was a regression that was introduced in version 0.18.7. That release added support for TypeScript's Edit: Specifically during the refactoring in 69a0c80, there's one spot where |
Here are examples that doesn't relate to decl foo[...x];
[...{a: 0} = c]
|
I have tried out all of the cases you mention in the esbuild playground. The links to each case are below. These ones look wrong, and are a result of the regression I mentioned earlier: These ones look correct to me:
Please let me know if there is additional information necessary to reproduce the problem for the ones that look correct to me. |
Many places the error location is wrong and point to wrong char / symbol. I think most of the failing cases are affected.
let {b, b} = {};
report 4th char as the position ofb
, but that's is a whitespace, but point at{
. The secondb
has also wrong pos reportedOther example
E.g in this case it point to correct symbol, but the position is wrong.
let x = a; function x(){};
var x; let x;
([foo], [foo]) => {}
In this case the loc points at the generator pos and not the symbol
{ function *foo() {}; function *foo() {}; }
This case is messed up
[...0,a]=0
The text was updated successfully, but these errors were encountered: