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

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

Issue 15888009: Fix http://dartbug.com/8669 by making sure we do not crash when trying to use Object as a mixin. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 320
321 static const ILLEGAL_CONSTRUCTOR_MODIFIERS = const MessageKind( 321 static const ILLEGAL_CONSTRUCTOR_MODIFIERS = const MessageKind(
322 "Error: illegal constructor modifiers: #{modifiers}."); 322 "Error: illegal constructor modifiers: #{modifiers}.");
323 323
324 static const ILLEGAL_MIXIN_APPLICATION_MODIFIERS = const MessageKind( 324 static const ILLEGAL_MIXIN_APPLICATION_MODIFIERS = const MessageKind(
325 "Error: illegal mixin application modifiers: #{modifiers}."); 325 "Error: illegal mixin application modifiers: #{modifiers}.");
326 326
327 static const ILLEGAL_MIXIN_SUPERCLASS = const MessageKind( 327 static const ILLEGAL_MIXIN_SUPERCLASS = const MessageKind(
328 "Error: class used as mixin must have Object as superclass."); 328 "Error: class used as mixin must have Object as superclass.");
329 329
330 static const ILLEGAL_MIXIN_OBJECT = const MessageKind(
331 "Error: cannot use Object as mixin.");
332
330 static const ILLEGAL_MIXIN_CONSTRUCTOR = const MessageKind( 333 static const ILLEGAL_MIXIN_CONSTRUCTOR = const MessageKind(
331 "Error: class used as mixin cannot have non-factory constructor."); 334 "Error: class used as mixin cannot have non-factory constructor.");
332 335
333 static const ILLEGAL_MIXIN_CYCLE = const MessageKind( 336 static const ILLEGAL_MIXIN_CYCLE = const MessageKind(
334 "Error: class used as mixin introduces mixin cycle: " 337 "Error: class used as mixin introduces mixin cycle: "
335 "#{mixinName1} <-> #{mixinName2}."); 338 "#{mixinName1} <-> #{mixinName2}.");
336 339
337 static const ILLEGAL_MIXIN_WITH_SUPER = const MessageKind( 340 static const ILLEGAL_MIXIN_WITH_SUPER = const MessageKind(
338 "Error: cannot use class #{className} as a mixin because it uses super."); 341 "Error: cannot use class #{className} as a mixin because it uses super.");
339 342
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 613
611 class CompileTimeConstantError extends Diagnostic { 614 class CompileTimeConstantError extends Diagnostic {
612 CompileTimeConstantError(MessageKind kind, [Map arguments = const {}]) 615 CompileTimeConstantError(MessageKind kind, [Map arguments = const {}])
613 : super(kind, arguments); 616 : super(kind, arguments);
614 } 617 }
615 618
616 class CompilationError extends Diagnostic { 619 class CompilationError extends Diagnostic {
617 CompilationError(MessageKind kind, [Map arguments = const {}]) 620 CompilationError(MessageKind kind, [Map arguments = const {}])
618 : super(kind, arguments); 621 : super(kind, arguments);
619 } 622 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698