From 59d6d604b45b1c46a040c73bf3efa9783e225ba3 Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Thu, 11 Dec 2014 00:30:21 +0100 Subject: [PATCH] fix(analyzer): fix a warning about an unused variable --- .../src/parser/context_with_variable_bindings.js | 2 +- modules/facade/src/collection.dart | 2 ++ modules/facade/src/collection.es6 | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/change_detection/src/parser/context_with_variable_bindings.js b/modules/change_detection/src/parser/context_with_variable_bindings.js index 2f4b630e81..0ae0f325e5 100644 --- a/modules/change_detection/src/parser/context_with_variable_bindings.js +++ b/modules/change_detection/src/parser/context_with_variable_bindings.js @@ -31,7 +31,7 @@ export class ContextWithVariableBindings { } clearValues() { - for (var [k, v] of MapWrapper.iterable(this.varBindings)) { + for (var k of MapWrapper.keys(this.varBindings)) { MapWrapper.set(this.varBindings, k, null); } } diff --git a/modules/facade/src/collection.dart b/modules/facade/src/collection.dart index d39ebd5099..113ea9d150 100644 --- a/modules/facade/src/collection.dart +++ b/modules/facade/src/collection.dart @@ -50,6 +50,8 @@ class MapWrapper { static void delete(m, k) { m.remove(k); } static void clear(m) { m.clear(); } static Iterable iterable(m) { return new IterableMap(m); } + static Iterable keys(m) { return m.keys; } + static Iterable values(m) { return m.values; } } // TODO: how to export StringMap=Map as a type? diff --git a/modules/facade/src/collection.es6 b/modules/facade/src/collection.es6 index b6e7807b8c..67571b571b 100644 --- a/modules/facade/src/collection.es6 +++ b/modules/facade/src/collection.es6 @@ -25,6 +25,8 @@ export class MapWrapper { static delete(m, k) { m.delete(k); } static clear(m) { m.clear(); } static iterable(m) { return m; } + static keys(m) { return m.keys(); } + static values(m) { return m.values(); } } // TODO: cannot export StringMap as a type as Dart does not support renaming types...