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

Side by Side Diff: frog/leg/warnings.dart

Issue 9139014: Allow for-in to use a previously declared identifier as variable. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add more tests Created 8 years, 11 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 unified diff | Download patch | Annotate | Revision Log
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 class MessageKind { 5 class MessageKind {
6 final String template; 6 final String template;
7 const MessageKind(this.template); 7 const MessageKind(this.template);
8 8
9 static final GENERIC = const MessageKind('#{1}'); 9 static final GENERIC = const MessageKind('#{1}');
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 static final NO_THIS_IN_STATIC = const MessageKind( 51 static final NO_THIS_IN_STATIC = const MessageKind(
52 '\'this\' is only available in instance methods'); 52 '\'this\' is only available in instance methods');
53 static final DUPLICATE_INITIALIZER = const MessageKind( 53 static final DUPLICATE_INITIALIZER = const MessageKind(
54 'field #{1} is initialized more than once'); 54 'field #{1} is initialized more than once');
55 static final ALREADY_INITIALIZED = const MessageKind( 55 static final ALREADY_INITIALIZED = const MessageKind(
56 '#{1} was already initialized here'); 56 '#{1} was already initialized here');
57 static final INIT_STATIC_FIELD = const MessageKind( 57 static final INIT_STATIC_FIELD = const MessageKind(
58 'cannot initialize static field #{1}'); 58 'cannot initialize static field #{1}');
59 static final NOT_A_FIELD = const MessageKind( 59 static final NOT_A_FIELD = const MessageKind(
60 '#{1} is not a field'); 60 '#{1} is not a field');
61 static final INVALID_FOR_IN = const MessageKind(
62 'Invalid for-in variable declaration.');
61 63
62 toString() => template; 64 toString() => template;
63 } 65 }
64 66
65 class Message { 67 class Message {
66 final kind; 68 final kind;
67 final List arguments; 69 final List arguments;
68 String message; 70 String message;
69 71
70 Message(this.kind, this.arguments); 72 Message(this.kind, this.arguments);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 String toString() => message.toString(); 105 String toString() => message.toString();
104 } 106 }
105 107
106 class ResolutionWarning { 108 class ResolutionWarning {
107 final Message message; 109 final Message message;
108 ResolutionWarning.message(this.message); 110 ResolutionWarning.message(this.message);
109 ResolutionWarning(MessageKind kind, List<Type> arguments) 111 ResolutionWarning(MessageKind kind, List<Type> arguments)
110 : message = new Message(kind, arguments); 112 : message = new Message(kind, arguments);
111 String toString() => message.toString(); 113 String toString() => message.toString();
112 } 114 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698