diff options
Diffstat (limited to 'Source/Dafny/Translator.cs')
-rw-r--r-- | Source/Dafny/Translator.cs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/Source/Dafny/Translator.cs b/Source/Dafny/Translator.cs index a8079bf9..3958868e 100644 --- a/Source/Dafny/Translator.cs +++ b/Source/Dafny/Translator.cs @@ -440,19 +440,18 @@ namespace Microsoft.Dafny { //adding TraitParent function and axioms
AddTraitParentFuncAndAxioms();
-
if (InsertChecksums)
{
- foreach (var decl in sink.TopLevelDeclarations)
+ foreach (var impl in sink.Implementations)
{
- var impl = decl as Implementation;
- if (impl != null && impl.FindStringAttribute("checksum") == null)
+ if (impl.FindStringAttribute("checksum") == null)
{
impl.AddAttribute("checksum", "stable");
}
-
- var func = decl as Bpl.Function;
- if (func != null && func.FindStringAttribute("checksum") == null)
+ }
+ foreach (var func in sink.Functions)
+ {
+ if (func.FindStringAttribute("checksum") == null)
{
func.AddAttribute("checksum", "stable");
}
|