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

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

Issue 23452038: Check cycles in redirecting factories. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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 part of dart2js; 5 part of dart2js;
6 6
7 const DONT_KNOW_HOW_TO_FIX = ""; 7 const DONT_KNOW_HOW_TO_FIX = "";
8 8
9 /** 9 /**
10 * The messages in this file should meet the following guide lines: 10 * The messages in this file should meet the following guide lines:
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 'Warning: Not all paths lead to a return or throw statement.'); 162 'Warning: Not all paths lead to a return or throw statement.');
163 163
164 static const DualKind CANNOT_RESOLVE = const DualKind( 164 static const DualKind CANNOT_RESOLVE = const DualKind(
165 error: const MessageKind('Error: Cannot resolve "#{name}".'), 165 error: const MessageKind('Error: Cannot resolve "#{name}".'),
166 warning: const MessageKind('Warning: Cannot resolve "#{name}".')); 166 warning: const MessageKind('Warning: Cannot resolve "#{name}".'));
167 167
168 static const MessageKind CANNOT_RESOLVE_CONSTRUCTOR = const MessageKind( 168 static const MessageKind CANNOT_RESOLVE_CONSTRUCTOR = const MessageKind(
169 'Error: Cannot resolve constructor "#{constructorName}".'); 169 'Error: Cannot resolve constructor "#{constructorName}".');
170 170
171 static const MessageKind CANNOT_RESOLVE_CONSTRUCTOR_FOR_IMPLICIT = 171 static const MessageKind CANNOT_RESOLVE_CONSTRUCTOR_FOR_IMPLICIT =
172 const MessageKind( 172 const MessageKind('Error: cannot resolve constructor "#{constructorName}"'
173 'Error: cannot resolve constructor "#{constructorName}" for implicit' 173 ' for implicit super call.',
174 'super call.'); 174 howToFix: 'Try explicitly invoking a constructor of the super class',
175 examples: const ["""
176 class A {
177 A.foo() {}
178 }
179 class B etxends A {}
180 main() => new B();
181 """]);
175 182
176 static const MessageKind INVALID_UNNAMED_CONSTRUCTOR_NAME = const MessageKind( 183 static const MessageKind INVALID_UNNAMED_CONSTRUCTOR_NAME = const MessageKind(
177 'Error: Unnamed constructor name must be "#{name}".'); 184 'Error: Unnamed constructor name must be "#{name}".');
178 185
179 static const MessageKind INVALID_CONSTRUCTOR_NAME = const MessageKind( 186 static const MessageKind INVALID_CONSTRUCTOR_NAME = const MessageKind(
180 'Error: Constructor name must start with "#{name}".'); 187 'Error: Constructor name must start with "#{name}".');
181 188
182 static const DualKind CANNOT_RESOLVE_TYPE = const DualKind( 189 static const DualKind CANNOT_RESOLVE_TYPE = const DualKind(
183 error: const MessageKind('Error: Cannot resolve type "#{typeName}".'), 190 error: const MessageKind('Error: Cannot resolve type "#{typeName}".'),
184 warning: const MessageKind( 191 warning: const MessageKind(
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 266
260 static const DualKind CANNOT_FIND_CONSTRUCTOR = const DualKind( 267 static const DualKind CANNOT_FIND_CONSTRUCTOR = const DualKind(
261 error: const MessageKind( 268 error: const MessageKind(
262 'Error: Cannot find constructor "#{constructorName}".'), 269 'Error: Cannot find constructor "#{constructorName}".'),
263 warning: const MessageKind( 270 warning: const MessageKind(
264 'Warning: Cannot find constructor "#{constructorName}".')); 271 'Warning: Cannot find constructor "#{constructorName}".'));
265 272
266 static const MessageKind CYCLIC_CLASS_HIERARCHY = const MessageKind( 273 static const MessageKind CYCLIC_CLASS_HIERARCHY = const MessageKind(
267 'Error: "#{className}" creates a cycle in the class hierarchy.'); 274 'Error: "#{className}" creates a cycle in the class hierarchy.');
268 275
276 static const MessageKind CYCLIC_REDIRECTING_FACTORY = const MessageKind(
277 'Error: Redirecting factory leads to a cyclic redirection.');
278
269 static const MessageKind INVALID_RECEIVER_IN_INITIALIZER = const MessageKind( 279 static const MessageKind INVALID_RECEIVER_IN_INITIALIZER = const MessageKind(
270 'Error: Field initializer expected.'); 280 'Error: Field initializer expected.');
271 281
272 static const MessageKind NO_SUPER_IN_STATIC = const MessageKind( 282 static const MessageKind NO_SUPER_IN_STATIC = const MessageKind(
273 'Error: "super" is only available in instance methods.'); 283 'Error: "super" is only available in instance methods.');
274 284
275 static const MessageKind DUPLICATE_INITIALIZER = const MessageKind( 285 static const MessageKind DUPLICATE_INITIALIZER = const MessageKind(
276 'Error: Field "#{fieldName}" is initialized more than once.'); 286 'Error: Field "#{fieldName}" is initialized more than once.');
277 287
278 static const MessageKind ALREADY_INITIALIZED = const MessageKind( 288 static const MessageKind ALREADY_INITIALIZED = const MessageKind(
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after
1212 1222
1213 class CompileTimeConstantError extends Diagnostic { 1223 class CompileTimeConstantError extends Diagnostic {
1214 CompileTimeConstantError(MessageKind kind, Map arguments, bool terse) 1224 CompileTimeConstantError(MessageKind kind, Map arguments, bool terse)
1215 : super(kind, arguments, terse); 1225 : super(kind, arguments, terse);
1216 } 1226 }
1217 1227
1218 class CompilationError extends Diagnostic { 1228 class CompilationError extends Diagnostic {
1219 CompilationError(MessageKind kind, Map arguments, bool terse) 1229 CompilationError(MessageKind kind, Map arguments, bool terse)
1220 : super(kind, arguments, terse); 1230 : super(kind, arguments, terse);
1221 } 1231 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698