Browse Source

properly emit convert when the target and dest type are the same

svn path=/trunk/mcs/; revision=101661
Jb Evain 17 years ago
parent
commit
c213461fa6
1 changed files with 2 additions and 2 deletions
  1. 2 2
      mcs/class/System.Core/System.Linq.Expressions/UnaryExpression.cs

+ 2 - 2
mcs/class/System.Core/System.Linq.Expressions/UnaryExpression.cs

@@ -105,11 +105,11 @@ namespace System.Linq.Expressions {
 
 		void EmitConvert (EmitContext ec)
 		{
+			operand.Emit (ec);
+
 			if (Type == operand.Type)
 				return;
 
-			operand.Emit (ec);
-
 			if (IsCast ())
 				EmitCast (ec);
 			else