diff options
author | Dan Liew <daniel.liew@imperial.ac.uk> | 2014-07-28 17:59:36 +0100 |
---|---|---|
committer | Dan Liew <daniel.liew@imperial.ac.uk> | 2014-07-28 17:59:36 +0100 |
commit | 0a050dea52296ba1bdd5be25d1528ecf29fbc7ed (patch) | |
tree | dec1ac3701916bc7346122cd337035bad8f8212d /Source/Core/AbsyExpr.cs | |
parent | ef4313604b4cfd16c0f38c51a8d9f6fe0a13b44a (diff) |
Fix bug in BinderExpr where Equals() was not corrected implemented.
BinderExpr was doing:
object.Equals(this.TypeParameters, other.TypeParameters)
&& object.Equals(this.Dummies, other.Dummies)
Both of these are wrong because these are of type List<> and so
- object.Equals(this.TypeParamters, other.TypeParameters) will call this.TypeParameters.Equals(other.TypeParamters) (assuming they aren't references to the same list)
- object.Equals(this.Dummies, other.TypeParameters) will call this.TypeParameters.Equals(other.Dummies) (assuming they aren't references to the same list)
so this is becomes a reference comparision on Lists<>. This is wrong
because Equals() has been overloaded to implement structural equality.
This affects the classes ForallExpr, LambdaExpr and ExistsExpr.
Diffstat (limited to 'Source/Core/AbsyExpr.cs')
0 files changed, 0 insertions, 0 deletions