summaryrefslogtreecommitdiff
path: root/Source/Dafny/Cloner.cs
diff options
context:
space:
mode:
authorGravatar Rustan Leino <leino@microsoft.com>2012-10-05 17:57:40 -0700
committerGravatar Rustan Leino <leino@microsoft.com>2012-10-05 17:57:40 -0700
commita1a041f3549cb1665964d30b666c825767d59afb (patch)
treec0d06edd42a894c159656211ab1ab0717bd91c4c /Source/Dafny/Cloner.cs
parentb4206512348cb4a3cdf87ccf7212e5193e8d3b35 (diff)
Support default (which, here, means nameless) class-instance constructors
Diffstat (limited to 'Source/Dafny/Cloner.cs')
-rw-r--r--Source/Dafny/Cloner.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Dafny/Cloner.cs b/Source/Dafny/Cloner.cs
index 38c793c5..340683f6 100644
--- a/Source/Dafny/Cloner.cs
+++ b/Source/Dafny/Cloner.cs
@@ -357,10 +357,10 @@ namespace Microsoft.Dafny
var r = (TypeRhs)rhs;
if (r.ArrayDimensions != null) {
c = new TypeRhs(Tok(r.Tok), CloneType(r.EType), r.ArrayDimensions.ConvertAll(CloneExpr));
- } else if (r.InitCall != null) {
- c = new TypeRhs(Tok(r.Tok), CloneType(r.EType), (CallStmt)CloneStmt(r.InitCall));
- } else {
+ } else if (r.Arguments == null) {
c = new TypeRhs(Tok(r.Tok), CloneType(r.EType));
+ } else {
+ c = new TypeRhs(Tok(r.Tok), CloneType(r.EType), r.OptionalNameComponent, CloneExpr(r.ReceiverArgumentForInitCall), r.Arguments.ConvertAll(CloneExpr));
}
}
c.Attributes = CloneAttributes(rhs.Attributes);