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

Side by Side Diff: frog/leg/util/link_implementation.dart

Issue 8540013: Giving up on the change to report errors with factories and generic types. (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/parser.cc » ('j') | runtime/vm/parser.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // TODO(regis): Move type parameter <T> from the class declaration to the 5 class LinkFactory {
6 // factory declarations after the new factory syntax is implemented.
7 // See issues 226, 5257789, 5408808.
8 class LinkFactory<T> {
regis 2011/11/11 18:47:13 As a temporary workaround, you could try to have c
srdjan 2011/11/11 18:49:19 I try this next once, I have the build bot green a
9 factory Link(head, [Link tail]) { 6 factory Link(head, [Link tail]) {
10 return new LinkEntry(head, (tail === null) ? const LinkTail() : tail); 7 return new LinkEntry(head, (tail === null) ? const LinkTail() : tail);
11 } 8 }
12 9
13 factory Link.fromList(List list) { 10 factory Link.fromList(List list) {
14 switch (list.length) { 11 switch (list.length) {
15 case 0: 12 case 0:
16 return const LinkTail(); 13 return const LinkTail();
17 case 1: 14 case 1:
18 return new Link(list[0]); 15 return new Link(list[0]);
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 void addLast(T t) { 115 void addLast(T t) {
119 LinkEntry<T> entry = new LinkEntry<T>(t, null); 116 LinkEntry<T> entry = new LinkEntry<T>(t, null);
120 if (head === null) { 117 if (head === null) {
121 head = entry; 118 head = entry;
122 } else { 119 } else {
123 lastLink.realTail = entry; 120 lastLink.realTail = entry;
124 } 121 }
125 lastLink = entry; 122 lastLink = entry;
126 } 123 }
127 } 124 }
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/parser.cc » ('j') | runtime/vm/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698