mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 11:55:49 +00:00
Bug 1168666 - Update assertions to allow export specs to contain batch exports r=waldo
This commit is contained in:
parent
3d9b9475f3
commit
bf0d9da2db
@ -710,14 +710,20 @@ class NameResolver
|
||||
return false;
|
||||
break;
|
||||
|
||||
// Import/export spec lists contain only import/export specs
|
||||
// containing only pairs of names.
|
||||
// Import/export spec lists contain import/export specs containing
|
||||
// only pairs of names. Alternatively, an export spec lists may
|
||||
// contain a single export batch specifier.
|
||||
case PNK_IMPORT_SPEC_LIST: {
|
||||
case PNK_EXPORT_SPEC_LIST:
|
||||
MOZ_ASSERT(cur->isArity(PN_LIST));
|
||||
#ifdef DEBUG
|
||||
bool isImport = cur->isKind(PNK_IMPORT_SPEC_LIST);
|
||||
for (ParseNode* item = cur->pn_head; item; item = item->pn_next) {
|
||||
ParseNode* item = cur->pn_head;
|
||||
if (!isImport && item && item->isKind(PNK_EXPORT_BATCH_SPEC)) {
|
||||
MOZ_ASSERT(item->isArity(PN_NULLARY));
|
||||
break;
|
||||
}
|
||||
for (; item; item = item->pn_next) {
|
||||
MOZ_ASSERT(item->isKind(isImport ? PNK_IMPORT_SPEC : PNK_EXPORT_SPEC));
|
||||
MOZ_ASSERT(item->isArity(PN_BINARY));
|
||||
MOZ_ASSERT(item->pn_left->isKind(PNK_NAME));
|
||||
|
2
js/src/jit-test/tests/modules/bug-1168666.js
Normal file
2
js/src/jit-test/tests/modules/bug-1168666.js
Normal file
@ -0,0 +1,2 @@
|
||||
// |jit-test| error: SyntaxError
|
||||
export *
|
Loading…
Reference in New Issue
Block a user