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

Unified Diff: test/codegen/expect/math/math.js

Issue 959003003: Typecheck constructor initializers properly (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: test/codegen/expect/math/math.js
diff --git a/test/codegen/expect/math/math.js b/test/codegen/expect/math/math.js
index d6794459317203678471b2c905adac5024ec613d..af9ca3a18bb9bf90c687c3555dde4f1799207da0 100644
--- a/test/codegen/expect/math/math.js
+++ b/test/codegen/expect/math/math.js
@@ -357,8 +357,8 @@ var math;
Rectangle(left, top, width, height) {
this.left = left;
this.top = top;
- this.width = width['<'](0) ? dart.notNull(dart.throw_("Unimplemented PrefixExpression: -width")) * 0 : width;
- this.height = height['<'](0) ? dart.notNull(dart.throw_("Unimplemented PrefixExpression: -height")) * 0 : height;
+ this.width = dart.as(width['<'](0) ? dart.notNull(dart.throw_("Unimplemented PrefixExpression: -width")) * 0 : width, T);
+ this.height = dart.as(height['<'](0) ? dart.notNull(dart.throw_("Unimplemented PrefixExpression: -height")) * 0 : height, T);
super._RectangleBase();
}
Rectangle$fromPoints(a, b) {
@@ -378,8 +378,8 @@ var math;
MutableRectangle(left, top, width, height) {
this.left = left;
this.top = top;
- this._width = width['<'](0) ? _clampToZero(width) : width;
- this._height = height['<'](0) ? _clampToZero(height) : height;
+ this._width = dart.as(width['<'](0) ? _clampToZero(width) : width, T);
+ this._height = dart.as(height['<'](0) ? _clampToZero(height) : height, T);
super._RectangleBase();
}
MutableRectangle$fromPoints(a, b) {

Powered by Google App Engine
This is Rietveld 408576698