2010-05-27 Marek Safar <marek.safar@gmail.com>
[mono.git] / mcs / class / Microsoft.CSharp / Microsoft.CSharp.RuntimeBinder / CSharpUnaryOperationBinder.cs
index 05a27c1ce1d2f702c1f7ca7528a800a025d3fe14..5e495c15abe13e1f7833bb09e12c83765546dd71 100644 (file)
@@ -83,7 +83,7 @@ namespace Microsoft.CSharp.RuntimeBinder
                                else
                                        expr = new Compiler.Unary (GetOperator (), expr, Compiler.Location.Null);
 
-                               expr = new Compiler.Cast (new Compiler.TypeExpression (ReturnType, Compiler.Location.Null), expr);
+                               expr = new Compiler.Cast (new Compiler.TypeExpression (TypeImporter.Import (ReturnType), Compiler.Location.Null), expr);
 
                                if ((flags & CSharpBinderFlags.CheckedContext) != 0)
                                        expr = new Compiler.CheckedExpr (expr, Compiler.Location.Null);