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

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: Adjust test expectations. 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 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 COMPILER_CRASHED = const MessageKind( 392 static const COMPILER_CRASHED = const MessageKind(
393 "Error: The compiler crashed when compiling this element."); 393 "Error: The compiler crashed when compiling this element.");
394 394
395 static const ILLEGAL_STATIC = const MessageKind(
396 "Error: Static is only allowed on functions declared in a class.");
Johnni Winther 2013/03/07 17:39:51 Static -> static or 'static' to avoid capitalizing
karlklose 2013/03/08 09:15:00 Done.
397
395 static const PLEASE_REPORT_THE_CRASH = const MessageKind(''' 398 static const PLEASE_REPORT_THE_CRASH = const MessageKind('''
396 The compiler is broken. 399 The compiler is broken.
397 400
398 When compiling the above element, the compiler crashed. It is not 401 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 402 possible to tell if this is caused by a problem in your program or
400 not. Regardless, the compiler should not crash. 403 not. Regardless, the compiler should not crash.
401 404
402 The Dart team would greatly appreciate if you would take a moment to 405 The Dart team would greatly appreciate if you would take a moment to
403 report this problem at http://dartbug.com/new. 406 report this problem at http://dartbug.com/new.
404 407
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 573
571 class CompileTimeConstantError extends Diagnostic { 574 class CompileTimeConstantError extends Diagnostic {
572 CompileTimeConstantError(MessageKind kind, [Map arguments = const {}]) 575 CompileTimeConstantError(MessageKind kind, [Map arguments = const {}])
573 : super(kind, arguments); 576 : super(kind, arguments);
574 } 577 }
575 578
576 class CompilationError extends Diagnostic { 579 class CompilationError extends Diagnostic {
577 CompilationError(MessageKind kind, [Map arguments = const {}]) 580 CompilationError(MessageKind kind, [Map arguments = const {}])
578 : super(kind, arguments); 581 : super(kind, arguments);
579 } 582 }
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