Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: pkg/dev_compiler/test/codegen/lib/math/implement_rectangle_test.dart

Issue 2441693003: fix #27643, failed to virtualize fields if an abstract one is mixed in (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/dev_compiler/test/codegen/language/mixin_abstract_getter_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
1 import 'dart:math' hide Rectangle; 5 import 'dart:math' hide Rectangle;
2 import 'dart:math' as math show Point, Rectangle, MutableRectangle; 6 import 'dart:math' as math show Point, Rectangle, MutableRectangle;
3 import 'package:expect/expect.dart' show Expect; 7 import 'package:expect/expect.dart' show Expect;
4 8
5 void main() { 9 void main() {
6 verifyRectable(new Rectangle(1, 2, 3, 4)); 10 verifyRectable(new Rectangle(1, 2, 3, 4));
7 } 11 }
8 12
9 void verifyRectable(math.Rectangle rect) { 13 void verifyRectable(math.Rectangle rect) {
10 Expect.equals(1.0, rect.left.toDouble()); 14 Expect.equals(1.0, rect.left.toDouble());
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 } 71 }
68 72
69 Rectangle<T> intersection(math.Rectangle<T> rect) { 73 Rectangle<T> intersection(math.Rectangle<T> rect) {
70 T rLeft = max(left, rect.left); 74 T rLeft = max(left, rect.left);
71 T rTop = max(top, rect.top); 75 T rTop = max(top, rect.top);
72 T rRight = min(right, rect.right); 76 T rRight = min(right, rect.right);
73 T rBottom = min(bottom, rect.bottom); 77 T rBottom = min(bottom, rect.bottom);
74 return new Rectangle<T>(rLeft, rTop, rRight - rLeft, rBottom - rTop); 78 return new Rectangle<T>(rLeft, rTop, rRight - rLeft, rBottom - rTop);
75 } 79 }
76 } 80 }
OLDNEW
« no previous file with comments | « pkg/dev_compiler/test/codegen/language/mixin_abstract_getter_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698