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

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

Issue 12620002: Emit compile time error on static non-members. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reword warning and move it before the crash messages. Created 7 years, 9 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 class MessageKind { 7 class MessageKind {
8 final String template; 8 final String template;
9 const MessageKind(this.template); 9 const MessageKind(this.template);
10 10
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 382
383 static const FACTORY_REDIRECTION_IN_NON_FACTORY = const MessageKind( 383 static const FACTORY_REDIRECTION_IN_NON_FACTORY = const MessageKind(
384 "Error: Factory redirection only allowed in factories."); 384 "Error: Factory redirection only allowed in factories.");
385 385
386 static const MISSING_FACTORY_KEYWORD = const MessageKind( 386 static const MISSING_FACTORY_KEYWORD = const MessageKind(
387 "Did you forget a factory keyword here?"); 387 "Did you forget a factory keyword here?");
388 388
389 static const DEFERRED_LIBRARY_NAME_MISMATCH = const MessageKind( 389 static const DEFERRED_LIBRARY_NAME_MISMATCH = const MessageKind(
390 'Error: Library name mismatch "#{expectedName}" != "#{actualName}".'); 390 'Error: Library name mismatch "#{expectedName}" != "#{actualName}".');
391 391
392 static const ILLEGAL_STATIC = const MessageKind(
393 "Error: Modifier static is only allowed on functions declared in"
394 " a class.");
395
392 static const COMPILER_CRASHED = const MessageKind( 396 static const COMPILER_CRASHED = const MessageKind(
393 "Error: The compiler crashed when compiling this element."); 397 "Error: The compiler crashed when compiling this element.");
394 398
395 static const PLEASE_REPORT_THE_CRASH = const MessageKind(''' 399 static const PLEASE_REPORT_THE_CRASH = const MessageKind('''
396 The compiler is broken. 400 The compiler is broken.
397 401
398 When compiling the above element, the compiler crashed. It is not 402 When compiling the above element, the compiler crashed. It is not
399 possible to tell if this is caused by a problem in your program or 403 possible to tell if this is caused by a problem in your program or
400 not. Regardless, the compiler should not crash. 404 not. Regardless, the compiler should not crash.
401 405
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 574
571 class CompileTimeConstantError extends Diagnostic { 575 class CompileTimeConstantError extends Diagnostic {
572 CompileTimeConstantError(MessageKind kind, [Map arguments = const {}]) 576 CompileTimeConstantError(MessageKind kind, [Map arguments = const {}])
573 : super(kind, arguments); 577 : super(kind, arguments);
574 } 578 }
575 579
576 class CompilationError extends Diagnostic { 580 class CompilationError extends Diagnostic {
577 CompilationError(MessageKind kind, [Map arguments = const {}]) 581 CompilationError(MessageKind kind, [Map arguments = const {}])
578 : super(kind, arguments); 582 : super(kind, arguments);
579 } 583 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/resolution/members.dart ('k') | tests/co19/co19-dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698