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

Side by Side Diff: dart/tests/language/src/NonParameterizedFactoryTest.dart

Issue 8566003: Revert various changes to Link factories. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: frogsh 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
« dart/frog/tests/leg/src/LinkTest.dart ('K') | « dart/frog/type.dart ('k') | no next file » | no next file with comments »
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 interface Interface<T> factory Factory { 5 interface Interface<T> factory Factory {
6 Interface(); 6 Interface();
7 Interface.withArg(T value); 7 Interface.withArg(T value);
8 } 8 }
9 9
10 // A factory must be parametrized. Use legacy form.
11 class Factory { 10 class Factory {
12 factory Interface<T>() { 11 factory Interface<T>() {
13 return null; 12 return null;
14 } 13 }
15 14
16 factory Interface<T>.withArg(value) { 15 factory Interface<T>.withArg(value) {
17 return null; 16 return null;
18 } 17 }
19 } 18 }
20 19
21 main() { 20 main() {
22 new Interface(); 21 new Interface();
23 new Interface.withArg(4); 22 new Interface.withArg(4);
24 } 23 }
OLDNEW
« dart/frog/tests/leg/src/LinkTest.dart ('K') | « dart/frog/type.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698