Date.difference() fails on dart2js in checked mode #4437
Labels
closed-duplicate
Closed in favor of an existing report
P1
A high priority bug; for example, a single project is unusable or has many test failures
web-dart2js
The Date.difference() operation fails in dart2js in checked mode. e.g.
main() {
var localDate = new Date(2012,8,9,10,30,23,0,false);
var utcDate = new Date(2012,8,9,10,30,23,0,true);
var x = localDate.difference(utcDate);
print(x);
}
~/dart-repo/dart/out/ReleaseIA32/d8 out.js$.captureStackTrace($ .TypeError$($.S(value) + ' does not implement int
out.js:388: 1344533423000 does not implement int
throw
^
1344533423000 does not implement int
at [object Object].captureStackTrace (out.js:599:18)
at [object Object].intTypeCheck (out.js:388:11)
at DateImplementation.difference$1 (out.js:32:56)
at [object Object].main (out.js:920:67)
at out.js:1017:5
The text was updated successfully, but these errors were encountered: