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

Unified Diff: tool/input_sdk/private/js_helper.dart

Issue 2010873002: Add types for valueFromDecomposedDate (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: formatting Created 4 years, 7 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
« no previous file with comments | « lib/runtime/dart_sdk.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tool/input_sdk/private/js_helper.dart
diff --git a/tool/input_sdk/private/js_helper.dart b/tool/input_sdk/private/js_helper.dart
index 72df8d86a2e0eef64a496a501987861452df142a..9048d0facc5d6e72471edf702ef79b1e60849278 100644
--- a/tool/input_sdk/private/js_helper.dart
+++ b/tool/input_sdk/private/js_helper.dart
@@ -360,8 +360,8 @@ class Primitives {
return -JS('int', r'#.getTimezoneOffset()', lazyAsJsDate(receiver));
}
- static valueFromDecomposedDate(years, month, day, hours, minutes, seconds,
- milliseconds, isUtc) {
+ static num valueFromDecomposedDate(int years, int month, int day, int hours,
+ int minutes, int seconds, int milliseconds, bool isUtc) {
final int MAX_MILLISECONDS_SINCE_EPOCH = 8640000000000000;
checkInt(years);
checkInt(month);
@@ -372,7 +372,7 @@ class Primitives {
checkInt(milliseconds);
checkBool(isUtc);
var jsMonth = month - 1;
- var value;
+ num value;
if (isUtc) {
value = JS('num', r'Date.UTC(#, #, #, #, #, #, #)',
years, jsMonth, day, hours, minutes, seconds, milliseconds);
« no previous file with comments | « lib/runtime/dart_sdk.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698