Open GoogleCodeExporter opened 9 years ago
The bug is in the ExpressionKey nested class of Interceptor.
Equals method returns true for 2 setup expressions with the same arguments
swapped.
var eq = key.fixedString == this.fixedString && key.values.Count ==
this.values.Count;
var index = 0;
while (eq && index < this.values.Count)
{
eq |= this.values[index] == key.values[index];
index++;
}
The code says, that 2 expressions keys are equal if they have the same number
of arguments OR at least 2 arguments on the same position in the list are equal.
The | needs to be replaced with & or SequenceEquals can be used instead.
Nevertheless, GetHashCode method returns the same value for 2 different
ExpressionKeys having the arguments swapped, so I assume that needs to be fixed
as well.
Original comment by vlado.n...@gmail.com
on 17 Sep 2013 at 8:45
Hi,
Thank You for all this information's, however I need to say that we are
interested in fix and not root cost analysis.
Original comment by silve...@gmail.com
on 17 Sep 2013 at 11:49
Original issue reported on code.google.com by
silve...@gmail.com
on 5 Jun 2013 at 5:42Attachments: