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

Unified Diff: runtime/lib/array.dart

Issue 8602004: Fix code generation issue with new factory syntax. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 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 | « no previous file | runtime/lib/growable_array.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/array.dart
===================================================================
--- runtime/lib/array.dart (revision 1661)
+++ runtime/lib/array.dart (working copy)
@@ -2,9 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-class ListFactory<T> {
+class ListFactory {
- factory List.from(Iterable<T> other) {
+ factory List<T>.from(Iterable<T> other) {
GrowableObjectArray<T> list = new GrowableObjectArray<T>();
for (final e in other) {
list.add(e);
@@ -12,7 +12,7 @@
return list;
}
- factory List([int length = null]) {
+ factory List<T>([int length = null]) {
if (length === null) {
return new GrowableObjectArray<T>();
} else {
@@ -24,7 +24,7 @@
// TODO(srdjan): Use shared array implementation.
class ObjectArray<T> implements List<T> {
- factory ObjectArray(int length) native "ObjectArray_allocate";
+ factory ObjectArray<T>(int length) native "ObjectArray_allocate";
T operator [](int index) native "ObjectArray_getIndexed";
« no previous file with comments | « no previous file | runtime/lib/growable_array.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698