diff options
Diffstat (limited to 'Source/Dafny')
-rw-r--r-- | Source/Dafny/Translator.ssc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/Dafny/Translator.ssc b/Source/Dafny/Translator.ssc index eea9d91b..092ee146 100644 --- a/Source/Dafny/Translator.ssc +++ b/Source/Dafny/Translator.ssc @@ -1303,7 +1303,8 @@ namespace Microsoft.Dafny { substMap.Add(p, ie);
locals.Add(new Bpl.LocalVariable(local.Tok, new Bpl.TypedIdent(local.Tok, local.UniqueName, TrType(local.Type))));
Bpl.IdentifierExpr lhs = (Bpl.IdentifierExpr)etran.TrExpr(ie); // TODO: is this cast always justified?
- Bpl.Cmd cmd = Bpl.Cmd.SimpleAssign(p.tok, lhs, etran.TrExpr(e.Args[i]));
+ Expression ee = e.Args[i];
+ Bpl.Cmd cmd = Bpl.Cmd.SimpleAssign(p.tok, lhs, etran.CondApplyBox(p.tok, etran.TrExpr(ee), (!)ee.Type, p.Type));
builder.Add(cmd);
}
// check that the preconditions for the call hold
|