Skip to content

Commit dbfd26e

Browse files
Fix for Dictinonary.ContainsKey (Move the call after the restore of field state)
1 parent e1313da commit dbfd26e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/System.Linq.Dynamic.Core/Parser/ExpressionParser.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1740,15 +1740,15 @@ Expression ParseEnumerable(Expression instance, Type elementType, string methodN
17401740

17411741
Expression[] args = ParseArgumentList();
17421742

1743+
_it = outerIt;
1744+
_parent = oldParent;
1745+
17431746
if (isDictionary && _methodFinder.ContainsMethod(typeof(IDictionarySignatures), methodName, false, ref args))
17441747
{
17451748
var method = type.GetMethod(methodName);
17461749
return Expression.Call(instance, method, args);
17471750
}
17481751

1749-
_it = outerIt;
1750-
_parent = oldParent;
1751-
17521752
if (!_methodFinder.ContainsMethod(typeof(IEnumerableSignatures), methodName, false, ref args))
17531753
{
17541754
throw ParseError(errorPos, Res.NoApplicableAggregate, methodName, string.Join(",", args.Select(a => a.Type.Name).ToArray()));

0 commit comments

Comments
 (0)