Skip to content

Commit

Permalink
removed MayRename which is unnecessary now
Browse files Browse the repository at this point in the history
  • Loading branch information
shazqadeer committed Oct 25, 2024
1 parent 934a194 commit c59f931
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
4 changes: 0 additions & 4 deletions Source/Core/AST/Absy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -699,8 +699,6 @@ public override string ToString()
{
return cce.NonNull(Name);
}

public virtual bool MayRename => true;
}

public class TypeCtorDecl : NamedDeclaration
Expand Down Expand Up @@ -1971,8 +1969,6 @@ public DatatypeConstructor(Function func)
: base(func.tok, func.Name, func.TypeParameters, func.InParams, func.OutParams[0], func.Comment, func.Attributes)
{
}

public override bool MayRename => false;
}

public class Function : DeclWithFormals
Expand Down
6 changes: 1 addition & 5 deletions Source/VCExpr/ScopedNamer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,7 @@ public virtual string GetName(object thing, string inherentName)
}

var uniqueInherentName = NextFreeName(thing, inherentName);
if (thing is NamedDeclaration namedDeclaration && !namedDeclaration.MayRename)
{
result = uniqueInherentName;
}
else if (boogieDeterminedNames.Contains(inherentName))
if (boogieDeterminedNames.Contains(inherentName))
{
result = uniqueInherentName;
}
Expand Down

0 comments on commit c59f931

Please sign in to comment.