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

Unified Diff: corelib/src/implementation/hash_map_set.dart

Issue 8989015: Updates the corelib to the new default specification for interfaces and new factory syntax (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years 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 | « corelib/src/future.dart ('k') | corelib/src/implementation/linked_hash_map.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: corelib/src/implementation/hash_map_set.dart
diff --git a/corelib/src/implementation/hash_map_set.dart b/corelib/src/implementation/hash_map_set.dart
index 2495b8a313e71e51f647fbb9c01f96232ccedaf4..4e8b7103c4a8caec5af57f4a66ea2f1059635c85 100644
--- a/corelib/src/implementation/hash_map_set.dart
+++ b/corelib/src/implementation/hash_map_set.dart
@@ -50,10 +50,9 @@ class HashMapImplementation<K extends Hashable, V> implements HashMap<K, V> {
_values = new List<V>(_INITIAL_CAPACITY);
}
- // See issue 417. Works in the vm, fails in dartc and frog.
- factory HashMapImplementation.from(Map/*<K, V>*/ other) {
- Map/*<K, V>*/ result = new HashMapImplementation/*<K, V>*/();
- other.forEach((/*K*/ key, /*V*/ value) { result[key] = value; });
+ factory HashMapImplementation.from(Map<K, V> other) {
+ Map<K, V> result = new HashMapImplementation<K, V>();
+ other.forEach((K key, V value) { result[key] = value; });
return result;
}
@@ -275,9 +274,8 @@ class HashSetImplementation<E extends Hashable> implements HashSet<E> {
_backingMap = new HashMapImplementation<E, E>();
}
- // See issue 417. Works in the vm, fails in dartc and frog.
- factory HashSetImplementation.from(Iterable/*<E>*/ other) {
- Set/*<E>*/ set = new HashSetImplementation/*<E>*/();
+ factory HashSetImplementation.from(Iterable<E> other) {
+ Set<E> set = new HashSetImplementation<E>();
for (final e in other) {
set.add(e);
}
« no previous file with comments | « corelib/src/future.dart ('k') | corelib/src/implementation/linked_hash_map.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698