Skip to content

Regression: Incorrect line number tracking #779

@richarddd

Description

@richarddd

Regression introduced by: #660

Line numbers are incorrectly reported

Reproducable

a.js

import a from "./b.mjs";
a();

b.js

export default async function () {
  return "abc" + a;
}

Output

qjs --unhandled-rejection ./a.mjs
Possibly unhandled promise rejection: ReferenceError: a is not defined
    at default (./b.mjs:1:1)
    at <anonymous> (./a.mjs:2:1)

Expectation (version 0.6.0, or parent commit c8be383)

qjs --unhandled-rejection ./a.mjs
Possibly unhandled promise rejection: ReferenceError: a is not defined
    at default (b.mjs:2:18)
    at <anonymous> (a.mjs:2:1)

Related issues:
DelSkayn/rquickjs#406

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions