-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug in WhereIndexed #86
Comments
Hmm this looks legitimate. So you're saying this is a variable reused unintentionally? Do you mind adding a test case for it so we can clearly see this fail. I'm also surprised we don't have such a case unit tested already. |
hi, here's the test case: I think index behavior should be the same no matter what predicate is provided. otherwise, we could not do thanks
|
sorry I meant to say, can you send a PR with this test case? |
Line 32 in b1b02a1
for example we have this test case, you can add it next to that. |
Yeah I'm surprised the The part you highlighted seems accurate. First param passed to |
If the highlighted part is accurate, then I'm sure there's bug in |
* fixes #86 * fix example tests * fixed formatting
I believe
WhereIndexed
doesn't work as design:https://play.golang.org/p/HD5-rxIkpx0
output of the code above is
[1 2 3 4 5 6 7 8 9 10]
instead of
[3 6 9]
maybe the bug is here
https://github.com/ahmetb/go-linq/blob/master/where.go#L61
thanks!
The text was updated successfully, but these errors were encountered: