| 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 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 foo(static x) {} | 592 foo(static x) {} |
| 593 main() => foo(42); | 593 main() => foo(42); |
| 594 """, """ | 594 """, """ |
| 595 foo({static x}) {} | 595 foo({static x}) {} |
| 596 main() => foo(42); | 596 main() => foo(42); |
| 597 """, """ | 597 """, """ |
| 598 foo([static x]) {} | 598 foo([static x]) {} |
| 599 main() => foo(42); | 599 main() => foo(42); |
| 600 """]); | 600 """]); |
| 601 | 601 |
| 602 static const MessageKind FINAL_FUNCTION_TYPE_PARAMETER = const MessageKind( |
| 603 "Error: A function type parameter can't be declared final.", |
| 604 howToFix: "Try removing 'final'.", |
| 605 examples: const [""" |
| 606 foo(final int x(int a)) {} |
| 607 main() => foo((y) => 42); |
| 608 """, """ |
| 609 foo({final int x(int a)}) {} |
| 610 main() => foo((y) => 42); |
| 611 """, """ |
| 612 foo([final int x(int a)]) {} |
| 613 main() => foo((y) => 42); |
| 614 """]); |
| 615 |
| 616 static const MessageKind VAR_FUNCTION_TYPE_PARAMETER = const MessageKind( |
| 617 "Error: A function type parameter can't be declared with 'var'.", |
| 618 howToFix: "Try removing 'var'.", |
| 619 examples: const [""" |
| 620 foo(var int x(int a)) {} |
| 621 main() => foo((y) => 42); |
| 622 """, """ |
| 623 foo({var int x(int a)}) {} |
| 624 main() => foo((y) => 42); |
| 625 """, """ |
| 626 foo([var int x(int a)]) {} |
| 627 main() => foo((y) => 42); |
| 628 """]); |
| 629 |
| 602 static const MessageKind CANNOT_INSTANTIATE_TYPE_VARIABLE = const MessageKind( | 630 static const MessageKind CANNOT_INSTANTIATE_TYPE_VARIABLE = const MessageKind( |
| 603 "Error: Cannot instantiate type variable '#{typeVariableName}'."); | 631 "Error: Cannot instantiate type variable '#{typeVariableName}'."); |
| 604 | 632 |
| 605 static const MessageKind CYCLIC_TYPE_VARIABLE = const MessageKind( | 633 static const MessageKind CYCLIC_TYPE_VARIABLE = const MessageKind( |
| 606 "Warning: Type variable '#{typeVariableName}' is a supertype of itself."); | 634 "Warning: Type variable '#{typeVariableName}' is a supertype of itself."); |
| 607 | 635 |
| 608 static const CYCLIC_TYPEDEF = const MessageKind( | 636 static const CYCLIC_TYPEDEF = const MessageKind( |
| 609 "Error: A typedef can't refer to itself.", | 637 "Error: A typedef can't refer to itself.", |
| 610 howToFix: "Try removing all references to '#{typedefName}' " | 638 howToFix: "Try removing all references to '#{typedefName}' " |
| 611 "in the definition of '#{typedefName}'.", | 639 "in the definition of '#{typedefName}'.", |
| (...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1334 | 1362 |
| 1335 class CompileTimeConstantError extends Diagnostic { | 1363 class CompileTimeConstantError extends Diagnostic { |
| 1336 CompileTimeConstantError(MessageKind kind, Map arguments, bool terse) | 1364 CompileTimeConstantError(MessageKind kind, Map arguments, bool terse) |
| 1337 : super(kind, arguments, terse); | 1365 : super(kind, arguments, terse); |
| 1338 } | 1366 } |
| 1339 | 1367 |
| 1340 class CompilationError extends Diagnostic { | 1368 class CompilationError extends Diagnostic { |
| 1341 CompilationError(MessageKind kind, Map arguments, bool terse) | 1369 CompilationError(MessageKind kind, Map arguments, bool terse) |
| 1342 : super(kind, arguments, terse); | 1370 : super(kind, arguments, terse); |
| 1343 } | 1371 } |
| OLD | NEW |