Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mmews committed Jul 19, 2024
1 parent 7a815f2 commit 99745de
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ private void checkLocalScopeNamesConflict(VariableEnvironmentElement vee, ListMu
EObject dupeEO = iter.next();

if (baseEO instanceof N4ClassExpression || dupeEO instanceof N4ClassExpression) {
return;
continue;
}

// in case of when we duplicate element creating given scope (like function names)
Expand All @@ -350,7 +350,7 @@ private void checkLocalScopeNamesConflict(VariableEnvironmentElement vee, ListMu
messageHelper.descriptionWithLine(baseEO, name));
addIssue(dupeEO, findNameEAttribute(dupeEO), issueItem);
}
return;
continue;
}

// otherwise mark duplicates
Expand All @@ -367,12 +367,12 @@ private void checkLocalScopeNamesConflict(VariableEnvironmentElement vee, ListMu
/*
* Duplication only between ImportSpecifiers is handled in N4JSImportValidator
*/
return;
continue;
} else {
if (jsVariantHelper.isExternalMode(baseEO)) {
// allow name sharing only in N4JSD files
if (!isEqualNameDuplicate(baseEO, dupeEO)) {
return;
continue;
}
}

Expand Down Expand Up @@ -641,7 +641,7 @@ private ListMultimap<String, EObject> getLocalNames(VariableEnvironmentElement s
* Returns nested scopes of 'scope'. Only direct sub-scopes of 'scope' are returned, no sub-sub-scopes, i.e.
* sub-scopes of sub-scopes.
*/
private Iterator<VariableEnvironmentElement> getNestedScopes(final VariableEnvironmentElement scope) {
private Iterator<VariableEnvironmentElement> getNestedScopes(VariableEnvironmentElement scope) {
return filter(filter(EcoreUtilN4.getAllContentsFiltered(scope,
it -> !(createsScope(it.eContainer()) && it.eContainer() != scope)),
it -> createsScope(it)),
Expand Down

0 comments on commit 99745de

Please sign in to comment.