Skip to content

Commit

Permalink
Merge pull request #641 from EdruptCo/master
Browse files Browse the repository at this point in the history
Fix for arr linq where regression
  • Loading branch information
louthy committed Sep 28, 2019
2 parents 8fee2de + ff82095 commit 96de33c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion LanguageExt.Core/DataTypes/Arr/Arr.Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@ public static Arr<A> Where<A>(this Arr<A> ma, Func<A, bool> f)
mb.Add(a);
}
}
return new Arr<A>(ma);
return new Arr<A>(mb);
}

[Pure]
Expand Down
10 changes: 10 additions & 0 deletions LanguageExt.Tests/LinqTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,16 @@ from r in Range(1, 10)
Assert.True(res.Count() == 0);
}

[Fact]
public void WhereArrayTest()
{
var res1 = from v in Array(1, 2, 3, 4, 5)
where v < 3
select v;

Assert.True(res1.Count == 2);
}

[Fact]
public void WhereOptionTest()
{
Expand Down

0 comments on commit 96de33c

Please sign in to comment.