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

Unified Diff: lib/runtime/dart/_operations.js

Issue 1611753002: fixes #415, correct type for map literals (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | lib/runtime/dart/convert.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart/_operations.js
diff --git a/lib/runtime/dart/_operations.js b/lib/runtime/dart/_operations.js
index 3af72e9ae3a7ee17e4a87b1c54fe01ef70b6bc28..de193c2ba5c58cb411737b58861f5212eb5a8ed1 100644
--- a/lib/runtime/dart/_operations.js
+++ b/lib/runtime/dart/_operations.js
@@ -278,8 +278,10 @@ dart_library.library('dart/_operations', null, /* Imports */[
* example `map()`.
*/
// TODO(jmesserly): this could be faster
- function map(values) {
- let map = collection.LinkedHashMap.new();
+ function map(values, K, V) {
vsm 2016/01/20 23:39:33 FWIW, dart.list is in _classes. Kind of strange t
Jennifer Messerly 2016/02/01 23:39:48 Nice find. Added TODO.
+ if (K === void 0) K = types.dynamic;
+ if (V === void 0) V = types.dynamic;
+ let map = collection.LinkedHashMap$(K, V).new();
if (Array.isArray(values)) {
for (let i = 0, end = values.length - 1; i < end; i += 2) {
let key = values[i];
« no previous file with comments | « no previous file | lib/runtime/dart/convert.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698