| OLD | NEW |
| 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 const DONT_KNOW_HOW_TO_FIX = ""; | 7 const DONT_KNOW_HOW_TO_FIX = ""; |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * The messages in this file should meet the following guide lines: | 10 * The messages in this file should meet the following guide lines: |
| (...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 main() { | 537 main() { |
| 538 F f; | 538 F f; |
| 539 }"""]); | 539 }"""]); |
| 540 | 540 |
| 541 static const MessageKind CANNOT_INSTANTIATE_TYPE_VARIABLE = const MessageKind( | 541 static const MessageKind CANNOT_INSTANTIATE_TYPE_VARIABLE = const MessageKind( |
| 542 'Error: Cannot instantiate type variable "#{typeVariableName}".'); | 542 'Error: Cannot instantiate type variable "#{typeVariableName}".'); |
| 543 | 543 |
| 544 static const MessageKind CYCLIC_TYPE_VARIABLE = const MessageKind( | 544 static const MessageKind CYCLIC_TYPE_VARIABLE = const MessageKind( |
| 545 'Warning: Type variable "#{typeVariableName}" is a supertype of itself.'); | 545 'Warning: Type variable "#{typeVariableName}" is a supertype of itself.'); |
| 546 | 546 |
| 547 static const CYCLIC_TYPEDEF = const MessageKind( |
| 548 "Error: A typedef can't refer to itself.", |
| 549 howToFix: "Try removing all references to '#{typedefName}' " |
| 550 "in the definition of '#{typedefName}'.", |
| 551 examples: const [""" |
| 552 typedef F F(); // The return type 'F' is a self-reference. |
| 553 main() { F f = null; }"""]); |
| 554 |
| 555 static const CYCLIC_TYPEDEF_ONE = const MessageKind( |
| 556 "Error: A typedef can't refer to itself through another typedef.", |
| 557 howToFix: "Try removing all references to " |
| 558 "'#{otherTypedefName}' in the definition of '#{typedefName}'.", |
| 559 examples: const [""" |
| 560 typedef G F(); // The return type 'G' is a self-reference through typedef 'G'. |
| 561 typedef F G(); // The return type 'F' is a self-reference through typedef 'F'. |
| 562 main() { F f = null; }""", |
| 563 """ |
| 564 typedef G F(); // The return type 'G' creates a self-reference. |
| 565 typedef H G(); // The return type 'H' creates a self-reference. |
| 566 typedef H(F f); // The argument type 'F' creates a self-reference. |
| 567 main() { F f = null; }"""]); |
| 568 |
| 569 static const CYCLIC_TYPEDEF_TYPEVAR = const MessageKind( |
| 570 "Internal Error: Recursive type variable bounds are not " |
| 571 "supported on typedefs."); |
| 572 |
| 547 static const MessageKind CLASS_NAME_EXPECTED = const MessageKind( | 573 static const MessageKind CLASS_NAME_EXPECTED = const MessageKind( |
| 548 'Error: Class name expected.'); | 574 'Error: Class name expected.'); |
| 549 | 575 |
| 550 static const MessageKind CANNOT_EXTEND = const MessageKind( | 576 static const MessageKind CANNOT_EXTEND = const MessageKind( |
| 551 'Error: "#{type}" cannot be extended.'); | 577 'Error: "#{type}" cannot be extended.'); |
| 552 | 578 |
| 553 static const MessageKind CANNOT_IMPLEMENT = const MessageKind( | 579 static const MessageKind CANNOT_IMPLEMENT = const MessageKind( |
| 554 'Error: "#{type}" cannot be implemented.'); | 580 'Error: "#{type}" cannot be implemented.'); |
| 555 | 581 |
| 556 static const MessageKind DUPLICATE_EXTENDS_IMPLEMENTS = const MessageKind( | 582 static const MessageKind DUPLICATE_EXTENDS_IMPLEMENTS = const MessageKind( |
| (...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1212 | 1238 |
| 1213 class CompileTimeConstantError extends Diagnostic { | 1239 class CompileTimeConstantError extends Diagnostic { |
| 1214 CompileTimeConstantError(MessageKind kind, Map arguments, bool terse) | 1240 CompileTimeConstantError(MessageKind kind, Map arguments, bool terse) |
| 1215 : super(kind, arguments, terse); | 1241 : super(kind, arguments, terse); |
| 1216 } | 1242 } |
| 1217 | 1243 |
| 1218 class CompilationError extends Diagnostic { | 1244 class CompilationError extends Diagnostic { |
| 1219 CompilationError(MessageKind kind, Map arguments, bool terse) | 1245 CompilationError(MessageKind kind, Map arguments, bool terse) |
| 1220 : super(kind, arguments, terse); | 1246 : super(kind, arguments, terse); |
| 1221 } | 1247 } |
| OLD | NEW |