diff options
author | leino <unknown> | 2015-04-07 18:20:21 -0700 |
---|---|---|
committer | leino <unknown> | 2015-04-07 18:20:21 -0700 |
commit | 196888695fd805997b02c367d90ac3fbfef32370 (patch) | |
tree | 13ef4843bafa3785c66e34ee952ee2b2f7ef915e /Source/Dafny/Cloner.cs | |
parent | 985579d14df105de939807d1d344fc75ff49563d (diff) |
Revised look-up and compilation of inherited trait members (static functions/methods don't work yet)
Diffstat (limited to 'Source/Dafny/Cloner.cs')
-rw-r--r-- | Source/Dafny/Cloner.cs | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/Source/Dafny/Cloner.cs b/Source/Dafny/Cloner.cs index 3c266a28..6317e462 100644 --- a/Source/Dafny/Cloner.cs +++ b/Source/Dafny/Cloner.cs @@ -145,19 +145,13 @@ namespace Microsoft.Dafny if (member is Field) {
Contract.Assert(!(member is SpecialField)); // we don't expect a SpecialField to be cloned (or do we?)
var f = (Field)member;
- Field field = new Field(Tok(f.tok), f.Name, f.IsGhost, f.IsMutable, f.IsUserMutable, CloneType(f.Type), CloneAttributes(f.Attributes));
- field.Inherited = member.Inherited;
- return field;
+ return new Field(Tok(f.tok), f.Name, f.IsGhost, f.IsMutable, f.IsUserMutable, CloneType(f.Type), CloneAttributes(f.Attributes));
} else if (member is Function) {
var f = (Function)member;
- Function func = CloneFunction(f);
- func.Inherited = member.Inherited;
- return func;
+ return CloneFunction(f);
} else {
var m = (Method)member;
- Method method = CloneMethod(m);
- method.Inherited = member.Inherited;
- return method;
+ return CloneMethod(m);
}
}
|