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

Unified Diff: test/codegen/expect/core/core.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/core/core.js
diff --git a/test/codegen/expect/core/core.js b/test/codegen/expect/core/core.js
index ab011bd37149982f30e1f539ab8bf37612ace304..8f6fa837529f7c7e6145ce6f7f156a316b25f0c9 100644
--- a/test/codegen/expect/core/core.js
+++ b/test/codegen/expect/core/core.js
@@ -255,12 +255,12 @@ var core;
return new Duration({milliseconds: ms - otherMs});
}
DateTime$_internal(year, month, day, hour, minute, second, millisecond, isUtc) {
- this.isUtc = typeof isUtc == boolean ? isUtc : dart.throw_(new ArgumentError(isUtc));
- this.millisecondsSinceEpoch = dart.dinvokef(/* Unimplemented unknown name */checkInt, dart.dinvoke(/* Unimplemented unknown name */Primitives, 'valueFromDecomposedDate', year, month, day, hour, minute, second, millisecond, isUtc));
+ this.isUtc = dart.as(typeof isUtc == boolean ? isUtc : dart.throw_(new ArgumentError(isUtc)), bool);
+ this.millisecondsSinceEpoch = dart.as(dart.dinvokef(/* Unimplemented unknown name */checkInt, dart.dinvoke(/* Unimplemented unknown name */Primitives, 'valueFromDecomposedDate', year, month, day, hour, minute, second, millisecond, isUtc)), int);
}
DateTime$_now() {
this.isUtc = false;
- this.millisecondsSinceEpoch = dart.dinvoke(/* Unimplemented unknown name */Primitives, 'dateNow');
+ this.millisecondsSinceEpoch = dart.as(dart.dinvoke(/* Unimplemented unknown name */Primitives, 'dateNow'), int);
}
static _brokenDownDateToMillisecondsSinceEpoch(year, month, day, hour, minute, second, millisecond, isUtc) {
return dart.as(dart.dinvoke(/* Unimplemented unknown name */Primitives, 'valueFromDecomposedDate', year, month, day, hour, minute, second, millisecond, isUtc), int);
@@ -649,7 +649,7 @@ var core;
if (length === void 0)
length = null;
this.indexable = indexable;
- this.length = length !== null ? length : dart.dload(indexable, 'length');
+ this.length = dart.as(length !== null ? length : dart.dload(indexable, 'length'), int);
super.ArgumentError$value(invalidValue, name, message !== null ? message : "Index out of range");
}
get start() {
@@ -1032,7 +1032,7 @@ var core;
_GeneratorIterable(_end, generator) {
this._end = _end;
this._start = 0;
- this._generator = generator !== null ? generator : _id;
+ this._generator = dart.as(generator !== null ? generator : _id, _Generator);
super.IterableBase();
}
_GeneratorIterable$slice(_start, _end, _generator) {

Powered by Google App Engine
This is Rietveld 408576698