Skip to content

Commit

Permalink
Fixed subtle omission in isAlreadyDefined
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulKlint committed Mar 18, 2024
1 parent cab44b9 commit b3faa75
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/analysis/typepal/Collector.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,9 @@ Collector newCollector(str modelName, map[str,Tree] namedTrees, TypePalConfig co
}

bool _isAlreadyDefined(str id, Tree useOrDef){
lubdefs = { def | def <- lubDefinesPerLubScope[currentLubScope], def.id == id };

lubdefs = { def | def <- definesPerLubScope[currentLubScope], def.id == id } +
{ def | def <- lubDefinesPerLubScope[currentLubScope], def.id == id };

if(!isEmpty(lubdefs) && any(def <- lubdefs, isContainedIn(getLoc(useOrDef), def.scope))){
return true;
Expand Down

0 comments on commit b3faa75

Please sign in to comment.