Issue #4423 Chaining multiple collection with index - #4480
Conversation
|
@dotnet-policy-service agree company=Relaxdays |
1 similar comment
|
@dotnet-policy-service agree company=Relaxdays |
stevenaw
left a comment
There was a problem hiding this comment.
Thanks @crabstars !
I've pulled your changes and can see your new test passes with the changes and fails without. I've tried using the example from the original issue and it seems to still fail.
I think this is a good step forward though, and could merge on its own too. Did you want to pursue making the test from the originating issue work as well or would you like us to merge this as-is?
|
@stevenaw question is which assert fails. The second problem hasn't been fixed as is mentioned in the PR. I don't really have a strong opinion on the second problem though, since If the first problem still fails, that ain't good. |
|
Thank you for the responses. The first issue shouldn't be failing. I executed the NOT OK 1 from the reported problem, and it passed. @stevenaw, did it fail when you ran the test on that branch? If it succeeded, I believe we should proceed with the merge. |
|
@azygis if you want that If you dont know why, I can try to explain it in more detail |
|
Thanks for clarifying @azygis @crabstars |
|
@azygis ah no, I understand. I don't even know why I reported the second not-ok. It's actually fine, just a brain freeze when I wrote that assert. |
Fixes #4423 for master
First Error: System.InvalidOperationException : Stack empty We've addressed the "Stack empty" error. The issue was with how certain operators were being processed. To fix it, we adjusted the LeftPrecedence when we encounter an IndexerOperator.
Explanation: in the function
ReduceOperatorStacktheAndwill not be reduced with theIndexerOperator. This will then fail inNUnit.Framework.Constraints.ConstraintBuilder.Resolvefor theBinaryOperator.Reducebecause it tries to pop the stack two times and will then fail.Second Error: Default indexer accepting arguments < 0 > was not found on SomeTests+SomeStuff We believe this isn't a real error. It looks like @azygis is trying to access a collection in a specific way. He's currently using a collection of SomeStuff, but it seems he should be using a collection that contains other collections of SomeStuff.