Open trannamtrung1st opened 10 hours ago
Can you submit a PR to propose a fix?
I will try when I have time next week. I suspect that this issue is related to the parsing or statement tracking, so let's wait if there's anybody else who is more familiar with this process to give an idea.
Description:
When running in module mode, if a function is called that is undefined, the stacktrace reports an incorrect line number. It shows the line number of the next line instead of the line where the function is called.
Steps to reproduce:
Run this file in module mode using Jint.
Observe the stacktrace when it fails due to
test
being undefined.Expected behavior:
The stacktrace should show line 2 (where
const a = test(1,
is located) as the source of the error.Actual behavior:
The stacktrace incorrectly shows line 3 (where
2, 3, {});
is located) as the source of the error.Additional information:
Environment: