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

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

Issue 8515024: Require legacy form of type parameters in factories and report errors if a factory class does not... (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 | « tests/language/language.status ('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 class Factory { 10 // A factory must be parametrized. Use legacy form.
ngeoffray 2011/11/11 10:09:44 parameterized. I don't understand the comment. Wh
ahe 2011/11/11 14:54:30 A factory *class* do not have to be parameterized.
11 class Factory<T> {
ahe 2011/11/11 14:54:30 Remove the type variable.
srdjan 2011/11/11 16:33:39 Done.
11 factory Interface() { 12 factory Interface() {
ahe 2011/11/11 14:54:30 This should be: factory Interface<T>() {
srdjan 2011/11/11 16:33:39 Done.
12 return null; 13 return null;
13 } 14 }
14 15
15 factory Interface.withArg(value) { 16 factory Interface.withArg(value) {
ahe 2011/11/11 14:54:30 This should be: factory Interface<T>.withArg(valu
srdjan 2011/11/11 16:33:39 Done.
16 return null; 17 return null;
17 } 18 }
18 } 19 }
srdjan 2011/11/11 16:33:39 Marked the test failing with bugs mentioned.
19 20
20 main() { 21 main() {
21 new Interface(); 22 new Interface();
22 new Interface.withArg(4); 23 new Interface.withArg(4);
23 } 24 }
OLDNEW
« no previous file with comments | « tests/language/language.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698