diff options
author | Reza Ahmadi <reza.ahmadi@uta.fi> | 2014-11-05 20:49:26 +0200 |
---|---|---|
committer | Reza Ahmadi <reza.ahmadi@uta.fi> | 2014-11-05 20:49:26 +0200 |
commit | fd15838d416860cd7fe9e5303fb4d624d0b82ab3 (patch) | |
tree | a8ebd0ec2d3becc1c59cb654abb45795629c80a2 /Source/Dafny/Compiler.cs | |
parent | 053ec97ade4f70f1b66346582150cceb97c50ce4 (diff) |
Now the parser parses "Type" rather than "IToken" for a trait
Diffstat (limited to 'Source/Dafny/Compiler.cs')
-rw-r--r-- | Source/Dafny/Compiler.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Dafny/Compiler.cs b/Source/Dafny/Compiler.cs index a3312c4a..0e8b886b 100644 --- a/Source/Dafny/Compiler.cs +++ b/Source/Dafny/Compiler.cs @@ -247,9 +247,9 @@ namespace Microsoft.Dafny { else if (d is ClassDecl) {
var cl = (ClassDecl)d;
Indent(indent);
- if (cl.Trait != null && cl.Trait is TraitDecl)
+ if (cl.TraitObj != null && cl.TraitObj is TraitDecl)
{
- wr.WriteLine("public class @{0} : @{1}", cl.CompileName, cl.TraitId.val);
+ wr.WriteLine("public class @{0} : @{1}", cl.CompileName, ((UserDefinedType)cl.TraitTyp).tok);
}
else
wr.Write("public class @{0}", cl.CompileName);
@@ -767,7 +767,7 @@ namespace Microsoft.Dafny { {
Indent(indent);
wr.WriteLine("public {0} @{1};", TypeName(f.Type), f.CompileName);
- wr.Write("{0} @{1}.@{2}", TypeName(f.Type), c.Trait.CompileName, f.CompileName);
+ wr.Write("{0} @{1}.@{2}", TypeName(f.Type), c.TraitObj.CompileName, f.CompileName);
wr.WriteLine(" {");
wr.WriteLine(" get { ");
wr.Write("return this.@{0};", f.CompileName);
|