js-slang icon indicating copy to clipboard operation
js-slang copied to clipboard

Incorrect Error for ExportNamedDeclarations with sources

Open leeyi45 opened this issue 1 year ago • 1 comments

In folder mode:

// /program.js
import { show, heart } from './other.js';
show(heart);

// /other.js
export { show, heart } from 'rune';

leads to the error: Line 5: ReferenceError: Cannot access 'show' before initialization. If this type of export is unsupported, then this error message is not indicative of that fact.

Code here

leeyi45 avatar May 03 '23 22:05 leeyi45

Yes, Source syntax should explicitly forbid the export syntax

export { show, heart } from 'rune';

martin-henz avatar Jul 19 '23 03:07 martin-henz