fix left and right shift
authorJb Evain <jbevain@gmail.com>
Thu, 5 Jun 2008 12:46:16 +0000 (12:46 -0000)
committerJb Evain <jbevain@gmail.com>
Thu, 5 Jun 2008 12:46:16 +0000 (12:46 -0000)
svn path=/trunk/mcs/; revision=105015

mcs/class/System.Core/System.Linq.Expressions/Expression.cs

index 2923bc633ec3956eef9b9eb878b159040b761c7b..daded6d548c5cb66a078f87b4a7320faaae85578 100644 (file)
@@ -247,6 +247,11 @@ namespace System.Linq.Expressions {
                                                return null;
                                }
 
+                               if (oper_name == "op_LeftShift" || oper_name == "op_RightShift") {
+                                       if (IsInt (ultype) && rtype == typeof (int))
+                                               return null;
+                               }
+
                                throw new InvalidOperationException (
                                        String.Format ("Operation {0} not defined for {1} and {2}", oper_name != null ? oper_name.Substring (3) : "is", ltype, rtype));
                        }