Chromium Code Reviews| Index: frog/leg/operations.dart |
| diff --git a/frog/leg/operations.dart b/frog/leg/operations.dart |
| index 0f5ea51f6da5595c823b0b0c52191e0a2d913875..f9a7cd528dbbccef49a04a1e60afd8075d5d9f28 100644 |
| --- a/frog/leg/operations.dart |
| +++ b/frog/leg/operations.dart |
| @@ -241,8 +241,12 @@ class EqualsOperation implements BinaryOperation { |
| NumConstant leftNum = left; |
| NumConstant rightNum = right; |
| return new BoolConstant(leftNum.value == rightNum.value); |
| + } else if (!left.isConstructedObject()) { |
|
Lasse Reichstein Nielsen
2012/03/27 08:12:12
I'd prefer
else if (left.isConstructedObject())
floitsch
2012/03/28 00:25:21
hehe. that's what I had before. After long hesitat
|
| + // Unless we know that the user-defined object does not implement the |
| + // equality operator we cannot fold here. |
| + return new BoolConstant(left == right); |
| } |
| - return new BoolConstant(left == right); |
| + return null; |
| } |
| } |