Allow any expression to be used in where clause. Some custom linq implementations...
authorMarek Safar <marek.safar@gmail.com>
Thu, 3 Feb 2011 13:37:41 +0000 (13:37 +0000)
committerMarek Safar <marek.safar@gmail.com>
Thu, 3 Feb 2011 13:37:41 +0000 (13:37 +0000)
mcs/mcs/cs-parser.jay
mcs/mcs/linq.cs

index c2920ce94d6706cb56dd959ce91ac004897d5480..7a5d74fc3d5fec6661349930501aecdf0e45b388 100644 (file)
@@ -5664,9 +5664,9 @@ where_clause
          {
                current_block = new Linq.QueryBlock (compiler, current_block, lexer.Location);
          }
-         boolean_expression
+         expression
          {
-               $$ = new Linq.Where ((Linq.QueryBlock)current_block, (BooleanExpression)$3, GetLocation ($1));
+               $$ = new Linq.Where ((Linq.QueryBlock)current_block, (Expression)$3, GetLocation ($1));
 
                current_block.SetEndLocation (lexer.Location);
                current_block = current_block.Parent;
index afda9156828f0e93f4aa9863ea55b6c0b402d0fa..67f72d3341693383264d8413b8119af1cc760472 100644 (file)
@@ -644,7 +644,7 @@ namespace Mono.CSharp.Linq
 
        public class Where : AQueryClause
        {
-               public Where (QueryBlock block, BooleanExpression expr, Location loc)
+               public Where (QueryBlock block, Expression expr, Location loc)
                        : base (block, expr, loc)
                {
                }