| Index: pkg/dev_compiler/tool/input_sdk/lib/math/rectangle.dart
|
| diff --git a/pkg/dev_compiler/tool/input_sdk/lib/math/rectangle.dart b/pkg/dev_compiler/tool/input_sdk/lib/math/rectangle.dart
|
| index 6fe20755c258697a2ecda9e43b4a709bd73c83ae..bae6602cd76970e0ae838d9e93e0f4bd71ea83ab 100644
|
| --- a/pkg/dev_compiler/tool/input_sdk/lib/math/rectangle.dart
|
| +++ b/pkg/dev_compiler/tool/input_sdk/lib/math/rectangle.dart
|
| @@ -40,8 +40,15 @@ abstract class _RectangleBase<T extends num> {
|
|
|
| bool operator ==(other) {
|
| if (other is !Rectangle) return false;
|
| - return left == other.left && top == other.top && right == other.right &&
|
| - bottom == other.bottom;
|
| + // TODO(rnystrom): Type promotion doesn't currently promote the [other]
|
| + // to Rectangle from the above line, so do it explicitly here to avoid a
|
| + // dynamic send and work around:
|
| + // https://github.com/dart-lang/sdk/issues/27551
|
| + var otherRect = other as Rectangle;
|
| + return left == otherRect.left &&
|
| + top == otherRect.top &&
|
| + right == otherRect.right &&
|
| + bottom == otherRect.bottom;
|
| }
|
|
|
| int get hashCode => _JenkinsSmiHash.hash4(left.hashCode, top.hashCode,
|
|
|