Skip to content

Commit ce9986c

Browse files
committed
JS: Change signature of isShadowedFromBulkExport
1 parent 613895e commit ce9986c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

javascript/ql/lib/semmle/javascript/ES2015Modules.qll

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ class BulkReExportDeclaration extends ReExportDeclaration, @export_all_declarati
423423
overlay[global]
424424
override predicate exportsAs(LexicalName v, string name) {
425425
this.getReExportedES2015Module().exportsAs(v, name) and
426-
not isShadowedFromBulkExport(this, name)
426+
not isShadowedFromBulkExport(this.getEnclosingModule(), name)
427427
}
428428

429429
overlay[global]
@@ -433,8 +433,8 @@ class BulkReExportDeclaration extends ReExportDeclaration, @export_all_declarati
433433
}
434434

435435
/**
436-
* Holds if the given bulk export `reExport` should not re-export `name` because there is an explicit export
437-
* of that name in the same module.
436+
* Holds if bulk re-exports in `mod` should not re-export `name` because there is an explicit export
437+
* of that name in `mod`.
438438
*
439439
* At compile time, shadowing works across declaration spaces.
440440
* For instance, directly exporting an interface `X` will block a variable `X` from being re-exported:
@@ -446,8 +446,8 @@ class BulkReExportDeclaration extends ReExportDeclaration, @export_all_declarati
446446
* but we ignore this subtlety.
447447
*/
448448
overlay[global]
449-
private predicate isShadowedFromBulkExport(BulkReExportDeclaration reExport, string name) {
450-
exists(ExportNamedDeclaration other | other.getTopLevel() = reExport.getEnclosingModule() |
449+
private predicate isShadowedFromBulkExport(Module mod, string name) {
450+
exists(ExportNamedDeclaration other | other.getTopLevel() = mod |
451451
other.getAnExportedDecl().getName() = name
452452
or
453453
other.getASpecifier().getExportedName() = name

0 commit comments

Comments
 (0)