Skip to content

Commit

Permalink
Improved isContainedInScopes
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulKlint committed Oct 7, 2024
1 parent c96f4a0 commit 20a4046
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/analysis/typepal/Collector.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,12 @@ Collector newCollector(str modelName, map[str,Tree] namedTrees, TypePalConfig co
return true;
}
if(scopes[outer]?) {
outer = scopes[outer];
outer2 = scopes[outer];
if(isContainedIn(outer2, currentLubScope)){
outer = outer2;
} else {
return false;
}
} else {
return false;
}
Expand All @@ -358,10 +363,10 @@ Collector newCollector(str modelName, map[str,Tree] namedTrees, TypePalConfig co
if(!isEmpty(lubdefs) && any(def <- lubdefs, isContainedInScopes(useOrDefLoc, def.scope))){
return true;
}
for(def <- defines, def.id == id, config.isInferrable(def.idRole), isContainedInScopes(useOrDefLoc, def.scope)){
return true;
}

// for(def <- defines, def.id == id, config.isInferrable(def.idRole), isContainedInScopes(useOrDefLoc, def.scope)){
// return true;
// }

for(def <- defines, def.id == id, isContainedInScopes(useOrDefLoc, def.scope)){
return true;
Expand Down

0 comments on commit 20a4046

Please sign in to comment.