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

Unified Diff: sdk/lib/core/map.dart

Issue 11377102: Remove named function literals from library and tests (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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 | « runtime/vm/parser.cc ('k') | sdk/lib/core/queue.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/core/map.dart
===================================================================
--- sdk/lib/core/map.dart (revision 14804)
+++ sdk/lib/core/map.dart (working copy)
@@ -362,7 +362,7 @@
Collection<K> get keys {
List<K> list = new List<K>(length);
int i = 0;
- forEach(void _(K key, V value) {
+ forEach((K key, V value) {
list[i++] = key;
});
return list;
@@ -371,7 +371,7 @@
Collection<V> get values {
List<V> list = new List<V>(length);
int i = 0;
- forEach(void _(K key, V value) {
+ forEach((K key, V value) {
list[i++] = value;
});
return list;
@@ -474,7 +474,7 @@
Collection<K> get keys {
List<K> list = new List<K>(length);
int index = 0;
- _list.forEach(void _(_KeyValuePair<K, V> entry) {
+ _list.forEach((_KeyValuePair<K, V> entry) {
list[index++] = entry.key;
});
assert(index == length);
@@ -485,7 +485,7 @@
Collection<V> get values {
List<V> list = new List<V>(length);
int index = 0;
- _list.forEach(void _(_KeyValuePair<K, V> entry) {
+ _list.forEach((_KeyValuePair<K, V> entry) {
list[index++] = entry.value;
});
assert(index == length);
@@ -493,7 +493,7 @@
}
void forEach(void f(K key, V value)) {
- _list.forEach(void _(_KeyValuePair<K, V> entry) {
+ _list.forEach((_KeyValuePair<K, V> entry) {
f(entry.key, entry.value);
});
}
@@ -503,7 +503,7 @@
}
bool containsValue(V value) {
- return _list.some(bool _(_KeyValuePair<K, V> entry) {
+ return _list.some((_KeyValuePair<K, V> entry) {
return (entry.value == value);
});
}
« no previous file with comments | « runtime/vm/parser.cc ('k') | sdk/lib/core/queue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698