Skip to content

Commit

Permalink
Add workaround for current flattener requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
bugarela committed Aug 9, 2023
1 parent b44fe7c commit 5757f35
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion quint/src/ir/namespacer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ class Namespacer implements IRTransformer {
}

exitDef(def: QuintDef): QuintDef {
if (isFlat(def) && !this.namesToPreserve.has(def.name)) {
// FIXME: The current flattener expects `namesToPreserve` to be ignored for def names.
// In the new flattener, we will need to consider it here as well.
// Also, considering it here makes the interface consistent.
// Uncomment the following line when the new flattener is in place:
// if (isFlat(def) && !this.namesToPreserve.has(def.name)) {
if (isFlat(def)) {
return { ...def, name: namespacedName(this.namespace, def.name) }
}

Expand Down

0 comments on commit 5757f35

Please sign in to comment.