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

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

Issue 10996039: Bring type variables into static scope, but produce compile-time error when they are used. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Produce warning and dynamic type error instead of compile-time error. 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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 300
301 static const CANNOT_ACCESS_TYPE_VARIABLE_IN_STATIC_CONTEXT =
302 const MessageKind('cannot access type variable #{1} in static context');
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.
310 313
(...skipping 78 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