forked from quickjs-ng/quickjs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Before this commit it segfaulted, now it throws a SyntaxError. That's still not correct behavior but better than segfaulting. To be continued. Refs: quickjs-ng#567
- Loading branch information
1 parent
d9d6939
commit eec66d3
Showing
4 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import * as a from "./test_cyclic_import.js" | ||
export function f(x) { return 2 * a.g(x) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/*--- | ||
negative: | ||
phase: resolution | ||
type: SyntaxError | ||
---*/ | ||
// FIXME(bnoordhuis) shouldn't throw SyntaxError but that's still better | ||
// than segfaulting, see https://github.com/quickjs-ng/quickjs/issues/567 | ||
import {assert} from "./assert.js" | ||
import {f} from "./fixture_cyclic_import.js" | ||
export {f} | ||
export function g(x) { return x + 1 } | ||
assert(f(1), 4) |