OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 DON'T EDIT. GENERATED. DON'T EDIT. | 5 DON'T EDIT. GENERATED. DON'T EDIT. |
6 This file has been generated by 'publish.dart' in the dart_messages package. | 6 This file has been generated by 'publish.dart' in the dart_messages package. |
7 | 7 |
8 Messages are maintained in `lib/shared_messages.dart` of that same package. | 8 Messages are maintained in `lib/shared_messages.dart` of that same package. |
9 After any change to that file, run `bin/publish.dart` to generate a new version | 9 After any change to that file, run `bin/publish.dart` to generate a new version |
10 of the json, dart2js and analyzer representations. | 10 of the json, dart2js and analyzer representations. |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 ] | 66 ] |
67 ), // Generated. Don't edit. | 67 ), // Generated. Don't edit. |
68 MessageKind.CONSTRUCTOR_WITH_RETURN_TYPE: const MessageTemplate( | 68 MessageKind.CONSTRUCTOR_WITH_RETURN_TYPE: const MessageTemplate( |
69 MessageKind.CONSTRUCTOR_WITH_RETURN_TYPE, | 69 MessageKind.CONSTRUCTOR_WITH_RETURN_TYPE, |
70 "Constructors can't have a return type", | 70 "Constructors can't have a return type", |
71 howToFix: "Try removing the return type.", | 71 howToFix: "Try removing the return type.", |
72 examples: const [ | 72 examples: const [ |
73 "class A { int A() {} } main() { new A(); }", | 73 "class A { int A() {} } main() { new A(); }", |
74 ] | 74 ] |
75 ), // Generated. Don't edit. | 75 ), // Generated. Don't edit. |
| 76 MessageKind.MISSING_EXPRESSION_IN_THROW: const MessageTemplate( |
| 77 MessageKind.MISSING_EXPRESSION_IN_THROW, |
| 78 "Missing expression after 'throw'.", |
| 79 howToFix: "Did you mean 'rethrow'?", |
| 80 examples: const [ |
| 81 "main() { throw; }", |
| 82 "main() { try { throw 0; } catch(e) { throw; } }", |
| 83 ] |
| 84 ), // Generated. Don't edit. |
| 85 MessageKind.RETHROW_OUTSIDE_CATCH: const MessageTemplate( |
| 86 MessageKind.RETHROW_OUTSIDE_CATCH, |
| 87 "Rethrow must be inside of catch clause", |
| 88 howToFix: "Try moving the expression into a catch clause, or using a 'throw'
expression.", |
| 89 examples: const [ |
| 90 "main() { rethrow; }", |
| 91 ] |
| 92 ), // Generated. Don't edit. |
76 MessageKind.RETURN_IN_GENERATIVE_CONSTRUCTOR: const MessageTemplate( | 93 MessageKind.RETURN_IN_GENERATIVE_CONSTRUCTOR: const MessageTemplate( |
77 MessageKind.RETURN_IN_GENERATIVE_CONSTRUCTOR, | 94 MessageKind.RETURN_IN_GENERATIVE_CONSTRUCTOR, |
78 "Constructors can't return values.", | 95 "Constructors can't return values.", |
79 howToFix: "Try removing the return statement or using a factory constructor.
", | 96 howToFix: "Try removing the return statement or using a factory constructor.
", |
80 examples: const [ | 97 examples: const [ |
81 r""" | 98 r""" |
82 class C { | 99 class C { |
83 C() { | 100 C() { |
84 return 1; | 101 return 1; |
85 } | 102 } |
(...skipping 11 matching lines...) Expand all Loading... |
97 foo() async* { return 0; } | 114 foo() async* { return 0; } |
98 main() => foo(); | 115 main() => foo(); |
99 """, | 116 """, |
100 r""" | 117 r""" |
101 foo() sync* { return 0; } | 118 foo() sync* { return 0; } |
102 main() => foo(); | 119 main() => foo(); |
103 """, | 120 """, |
104 ] | 121 ] |
105 ), // Generated. Don't edit. | 122 ), // Generated. Don't edit. |
106 }; | 123 }; |
OLD | NEW |