diff options
Diffstat (limited to 'Source/Dafny/Printer.cs')
-rw-r--r-- | Source/Dafny/Printer.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/Dafny/Printer.cs b/Source/Dafny/Printer.cs index ce693036..c6bc563c 100644 --- a/Source/Dafny/Printer.cs +++ b/Source/Dafny/Printer.cs @@ -264,7 +264,10 @@ namespace Microsoft.Dafny { public void PrintClass(ClassDecl c, int indent) {
Contract.Requires(c != null);
Indent(indent);
- PrintClassMethodHelper("class", c.Attributes, c.Name, c.TypeArgs);
+ PrintClassMethodHelper((c is TraitDecl) ? "trait" : "class", c.Attributes, c.Name, c.TypeArgs);
+ if (c.TraitId != null) {
+ wr.Write(" extends {0}", c.TraitId.val);
+ }
if (c.Members.Count == 0) {
wr.WriteLine(" { }");
} else {
|