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

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

Issue 11087025: Fix to dartbug.com/5170, explictly static library variables now get an appropriate error message. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Comments from Peter. Created 8 years, 2 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 const GENERIC = const MessageKind('#{1}'); 9 static const GENERIC = const MessageKind('#{1}');
10 10
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 "Optional parameter count of patch method (#{3}) doesn't match parameter " 290 "Optional parameter count of patch method (#{3}) doesn't match parameter "
291 "count on origin method '#{1}' (#{2})."); 291 "count on origin method '#{1}' (#{2}).");
292 292
293 static const PATCH_OPTIONAL_PARAMETER_NAMED_MISMATCH = const MessageKind( 293 static const PATCH_OPTIONAL_PARAMETER_NAMED_MISMATCH = const MessageKind(
294 "Optional parameters of origin and patch method '#{1}' must " 294 "Optional parameters of origin and patch method '#{1}' must "
295 "both be either named or positional."); 295 "both be either named or positional.");
296 296
297 static const PATCH_PARAMETER_MISMATCH = const MessageKind( 297 static const PATCH_PARAMETER_MISMATCH = const MessageKind(
298 "Patch method parameter '#{3}' doesn't match '#{2}' on origin method " 298 "Patch method parameter '#{3}' doesn't match '#{2}' on origin method "
299 "#{1}."); 299 "#{1}.");
300
301 static const TOP_LEVEL_VARIABLE_DECLARED_STATIC = const MessageKind(
302 "Top-level variable cannot be declared static.");
300 303
301 static const COMPILER_CRASHED = const MessageKind( 304 static const COMPILER_CRASHED = const MessageKind(
302 "Error: The compiler crashed when compiling this element."); 305 "Error: The compiler crashed when compiling this element.");
303 306
304 static const PLEASE_REPORT_THE_CRASH = const MessageKind(''' 307 static const PLEASE_REPORT_THE_CRASH = const MessageKind('''
305 The compiler is broken. 308 The compiler is broken.
306 309
307 When compiling the above element, the compiler crashed. It is not 310 When compiling the above element, the compiler crashed. It is not
308 possible to tell if this is caused by a problem in your program or 311 possible to tell if this is caused by a problem in your program or
309 not. Regardless, the compiler should not crash. 312 not. Regardless, the compiler should not crash.
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 392
390 class CompileTimeConstantError extends Diagnostic { 393 class CompileTimeConstantError extends Diagnostic {
391 CompileTimeConstantError(MessageKind kind, List arguments) 394 CompileTimeConstantError(MessageKind kind, List arguments)
392 : super(kind, arguments); 395 : super(kind, arguments);
393 } 396 }
394 397
395 class CompilationError extends Diagnostic { 398 class CompilationError extends Diagnostic {
396 CompilationError(MessageKind kind, List arguments) 399 CompilationError(MessageKind kind, List arguments)
397 : super(kind, arguments); 400 : super(kind, arguments);
398 } 401 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698