Merge pull request #96 from ualtinok/master
[mono.git] / mcs / class / System.Core / System.Linq.Expressions / UnaryExpression.cs
index c580df36dacc215820cc05e29405ae1fb3a20b45..11e6240afca4b70ded4a82ad505686b9327ad32d 100644 (file)
@@ -388,7 +388,16 @@ namespace System.Linq.Expressions {
 
                void EmitQuote (EmitContext ec)
                {
+                       ec.EmitScope ();
+
                        ec.EmitReadGlobal (operand, typeof (Expression));
+
+                       if (ec.HasHoistedLocals)
+                               ec.EmitLoadHoistedLocalsStore ();
+                       else
+                               ec.ig.Emit (OpCodes.Ldnull);
+
+                       ec.EmitIsolateExpression ();
                }
 
                internal override void Emit (EmitContext ec)