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

Unified Diff: pkg/collection/lib/wrappers.dart

Issue 252133002: pkg/collection: define delegating collection constructors as const (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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 | pkg/collection/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/collection/lib/wrappers.dart
diff --git a/pkg/collection/lib/wrappers.dart b/pkg/collection/lib/wrappers.dart
index b15a6bdaf3f477bd6431970e091f9671aa61ac23..0fcc8c23e80a42f6e86c84ebea3988f512cfca02 100644
--- a/pkg/collection/lib/wrappers.dart
+++ b/pkg/collection/lib/wrappers.dart
@@ -31,7 +31,7 @@ class DelegatingIterable<E> implements Iterable<E> {
/**
* Create a wrapper that forwards operations to [base].
*/
- DelegatingIterable(Iterable<E> base) : _base = base;
+ const DelegatingIterable(Iterable<E> base) : _base = base;
bool any(bool test(E element)) => _base.any(test);
@@ -102,7 +102,7 @@ class DelegatingIterable<E> implements Iterable<E> {
* list object.
*/
class DelegatingList<E> extends DelegatingIterable<E> implements List<E> {
- DelegatingList(List<E> base) : super(base);
+ const DelegatingList(List<E> base) : super(base);
List<E> get _listBase => _base;
@@ -201,7 +201,7 @@ class DelegatingList<E> extends DelegatingIterable<E> implements List<E> {
* set object.
*/
class DelegatingSet<E> extends DelegatingIterable<E> implements Set<E> {
- DelegatingSet(Set<E> base) : super(base);
+ const DelegatingSet(Set<E> base) : super(base);
Set<E> get _setBase => _base;
@@ -252,7 +252,7 @@ class DelegatingSet<E> extends DelegatingIterable<E> implements Set<E> {
* queue object.
*/
class DelegatingQueue<E> extends DelegatingIterable<E> implements Queue<E> {
- DelegatingQueue(Queue<E> queue) : super(queue);
+ const DelegatingQueue(Queue<E> queue) : super(queue);
Queue<E> get _baseQueue => _base;
@@ -297,7 +297,7 @@ class DelegatingQueue<E> extends DelegatingIterable<E> implements Queue<E> {
class DelegatingMap<K, V> implements Map<K, V> {
final Map<K, V> _base;
- DelegatingMap(Map<K, V> base) : _base = base;
+ const DelegatingMap(Map<K, V> base) : _base = base;
V operator [](Object key) => _base[key];
« no previous file with comments | « no previous file | pkg/collection/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698