fixed module cyclic imports (#329)

This commit is contained in:
Fabrice Bellard
2025-04-05 18:05:15 +02:00
parent c1bf4e99db
commit 159fe289e3
5 changed files with 110 additions and 14 deletions

View File

@@ -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)