diff options
author | Mike Barnett <mbarnett@microsoft.com> | 2012-01-10 15:34:56 -0800 |
---|---|---|
committer | Mike Barnett <mbarnett@microsoft.com> | 2012-01-10 15:34:56 -0800 |
commit | bbdbc568dccebda54ef8f5c2e00bf92c9f76072f (patch) | |
tree | 1bf7f174fa743ef018d66d484b09e8dae7bbeedb /BCT/BytecodeTranslator/ExpressionTraverser.cs | |
parent | f73f38b9770ce2b47c1f654f76a0e9871b14c28b (diff) |
Fix call to struct copy ctor.
Diffstat (limited to 'BCT/BytecodeTranslator/ExpressionTraverser.cs')
-rw-r--r-- | BCT/BytecodeTranslator/ExpressionTraverser.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/BCT/BytecodeTranslator/ExpressionTraverser.cs b/BCT/BytecodeTranslator/ExpressionTraverser.cs index 3a8deab3..723b90ca 100644 --- a/BCT/BytecodeTranslator/ExpressionTraverser.cs +++ b/BCT/BytecodeTranslator/ExpressionTraverser.cs @@ -752,8 +752,8 @@ namespace BytecodeTranslator // but pass a copy of it.
if (TranslationHelper.IsStruct(currentType)) {
var proc = this.sink.FindOrCreateProcedureForStructCopy(currentType);
- var bplLocal = Bpl.Expr.Ident(this.sink.CreateFreshLocal(e.Type));
- var cmd = new Bpl.CallCmd(token, proc.Name, new List<Bpl.Expr> { e, }, new List<Bpl.IdentifierExpr>{ bplLocal, });
+ var bplLocal = Bpl.Expr.Ident(this.sink.CreateFreshLocal(currentType));
+ var cmd = new Bpl.CallCmd(token, proc.Name, new List<Bpl.Expr> { e, }, new List<Bpl.IdentifierExpr> { bplLocal, });
this.StmtTraverser.StmtBuilder.Add(cmd);
e = bplLocal;
}
|