standard-things / esm

Tomorrow's ECMAScript modules today!
Other
5.27k stars 146 forks source link

test262 bug: trailing comma in export declaration #545

Closed dnalborczyk closed 6 years ago

dnalborczyk commented 6 years ago

[opening seperate issues for tracking purposes]

ExportsList in ExportDeclaration may include a trailing comma

test case: https://github.com/tc39/test262/blob/master/test/language/module-code/instn-iee-trlng-comma.js

export { a , } from './instn-iee-trlng-comma_FIXTURE.js';
export { a as b , } from './instn-iee-trlng-comma_FIXTURE.js';
assert.sameValue(a, 333, 'comma following named export');

ReferenceError: a is not defined
      at file:///test262/test/language/module-code/instn-iee-trlng-comma.js:129:24
      at Generator.next (<anonymous>)
jdalton commented 6 years ago

This isn't about the trailing comma. It's the self circular reference if I had to guess.

Update:

Confirmed this bug is a dup of #544.