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

Side by Side Diff: lib/compiler/implementation/warnings.dart

Issue 10834061: Resolve typedefs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated scope handling and type resolution Created 8 years, 4 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
11 static final NOT_ASSIGNABLE = const MessageKind( 11 static final NOT_ASSIGNABLE = const MessageKind(
12 '#{2} is not assignable to #{1}'); 12 '#{2} is not assignable to #{1}');
13 static final VOID_EXPRESSION = const MessageKind( 13 static final VOID_EXPRESSION = const MessageKind(
14 'expression does not yield a value'); 14 'expression does not yield a value');
15 static final VOID_VARIABLE = const MessageKind( 15 static final VOID_VARIABLE = const MessageKind(
16 'variable cannot be of type void'); 16 'variable cannot be of type void');
17 static final RETURN_VALUE_IN_VOID = const MessageKind( 17 static final RETURN_VALUE_IN_VOID = const MessageKind(
18 'cannot return value from void function'); 18 'cannot return value from void function');
19 static final RETURN_NOTHING = const MessageKind( 19 static final RETURN_NOTHING = const MessageKind(
20 'value of type #{1} expected'); 20 'value of type #{1} expected');
21 static final MISSING_ARGUMENT = const MessageKind( 21 static final MISSING_ARGUMENT = const MessageKind(
22 'missing argument of type #{1}'); 22 'missing argument of type #{1}');
23 static final ADDITIONAL_ARGUMENT = const MessageKind( 23 static final ADDITIONAL_ARGUMENT = const MessageKind(
24 'additional argument'); 24 'additional argument');
25 static final PROPERTY_NOT_FOUND = const MessageKind(
26 'no property named #{2} in class #{1}');
25 static final METHOD_NOT_FOUND = const MessageKind( 27 static final METHOD_NOT_FOUND = const MessageKind(
26 'no method named #{2} in class #{1}'); 28 'no method named #{2} in class #{1}');
27 static final MEMBER_NOT_STATIC = const MessageKind( 29 static final MEMBER_NOT_STATIC = const MessageKind(
28 '#{1}.#{2} is not static'); 30 '#{1}.#{2} is not static');
29 static final NO_INSTANCE_AVAILABLE = const MessageKind( 31 static final NO_INSTANCE_AVAILABLE = const MessageKind(
30 '#{1} is only available in instance methods'); 32 '#{1} is only available in instance methods');
31 33
32 static final UNREACHABLE_CODE = const MessageKind( 34 static final UNREACHABLE_CODE = const MessageKind(
33 'unreachable code'); 35 'unreachable code');
34 static final MISSING_RETURN = const MessageKind( 36 static final MISSING_RETURN = const MessageKind(
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 static final EXISTING_LABEL = const MessageKind( 117 static final EXISTING_LABEL = const MessageKind(
116 'original declaration of duplicate label #{1}'); 118 'original declaration of duplicate label #{1}');
117 static final DUPLICATE_LABEL = const MessageKind( 119 static final DUPLICATE_LABEL = const MessageKind(
118 'duplicate declaration of label #{1}'); 120 'duplicate declaration of label #{1}');
119 static final UNUSED_LABEL = const MessageKind( 121 static final UNUSED_LABEL = const MessageKind(
120 'unused label #{1}'); 122 'unused label #{1}');
121 static final INVALID_CONTINUE = const MessageKind( 123 static final INVALID_CONTINUE = const MessageKind(
122 'target of continue is not a loop or switch case'); 124 'target of continue is not a loop or switch case');
123 static final TYPE_VARIABLE_AS_CONSTRUCTOR = const MessageKind( 125 static final TYPE_VARIABLE_AS_CONSTRUCTOR = const MessageKind(
124 'cannot use type variable as constructor'); 126 'cannot use type variable as constructor');
127 static final DUPLICATE_TYPE_VARIABLE_NAME = const MessageKind(
128 'type variable #{1} already declared');
125 static final INVALID_BREAK = const MessageKind( 129 static final INVALID_BREAK = const MessageKind(
126 'target of break is not a statement'); 130 'target of break is not a statement');
127 static final INVALID_USE_OF_SUPER = const MessageKind( 131 static final INVALID_USE_OF_SUPER = const MessageKind(
128 'super not allowed here'); 132 'super not allowed here');
129 static final INVALID_CASE_DEFAULT = const MessageKind( 133 static final INVALID_CASE_DEFAULT = const MessageKind(
130 'default only allowed on last case of a switch'); 134 'default only allowed on last case of a switch');
131 static final INVALID_CASE_EXPRESSION = const MessageKind( 135 static final INVALID_CASE_EXPRESSION = const MessageKind(
132 'case expression is not a compile-time constant int or string.'); 136 'case expression is not a compile-time constant int or string.');
133 static final INVALID_CASE_EXPRESSION_TYPE = const MessageKind( 137 static final INVALID_CASE_EXPRESSION_TYPE = const MessageKind(
134 "case expressions don't all have the same type " 138 "case expressions don't all have the same type "
(...skipping 10 matching lines...) Expand all
145 'map-literal key not a string literal'); 149 'map-literal key not a string literal');
146 150
147 static final NO_SUCH_LIBRARY_MEMBER = const MessageKind( 151 static final NO_SUCH_LIBRARY_MEMBER = const MessageKind(
148 '#{1} has no member named #{2}'); 152 '#{1} has no member named #{2}');
149 153
150 static final CANNOT_INSTANTIATE_INTERFACE = const MessageKind( 154 static final CANNOT_INSTANTIATE_INTERFACE = const MessageKind(
151 "cannot instantiate interface '#{1}'"); 155 "cannot instantiate interface '#{1}'");
152 156
153 static final CANNOT_INSTANTIATE_TYPEDEF = const MessageKind( 157 static final CANNOT_INSTANTIATE_TYPEDEF = const MessageKind(
154 "cannot instantiate typedef '#{1}'"); 158 "cannot instantiate typedef '#{1}'");
159 static final CYCLIC_TYPEDEF = const MessageKind(
160 "the typedef #{1} may not refer to itself");
155 161
156 static final NO_DEFAULT_CLASS = const MessageKind( 162 static final NO_DEFAULT_CLASS = const MessageKind(
157 "no default class on enclosing interface '#{1}'"); 163 "no default class on enclosing interface '#{1}'");
158 164
159 static final CYCLIC_TYPE_VARIABLE = const MessageKind( 165 static final CYCLIC_TYPE_VARIABLE = const MessageKind(
160 "cyclic reference to type variable #{1}"); 166 "cyclic reference to type variable #{1}");
161 static final TYPE_NAME_EXPECTED = const MessageKind( 167 static final TYPE_NAME_EXPECTED = const MessageKind(
162 "class or interface name expected"); 168 "class or interface name expected");
163 169
164 static final CANNOT_EXTEND = const MessageKind( 170 static final CANNOT_EXTEND = const MessageKind(
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 307
302 class CompileTimeConstantError extends Diagnostic { 308 class CompileTimeConstantError extends Diagnostic {
303 CompileTimeConstantError(MessageKind kind, List<Type> arguments) 309 CompileTimeConstantError(MessageKind kind, List<Type> arguments)
304 : super(kind, arguments); 310 : super(kind, arguments);
305 } 311 }
306 312
307 class CompilationError extends Diagnostic { 313 class CompilationError extends Diagnostic {
308 CompilationError(MessageKind kind, List<Type> arguments) 314 CompilationError(MessageKind kind, List<Type> arguments)
309 : super(kind, arguments); 315 : super(kind, arguments);
310 } 316 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698