OLD | NEW |
---|---|
1 # Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 # Copyright (c) 2017, 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 # Each entry in this map corresponds to a diagnostic message. Ideally, each | 5 # Each entry in this map corresponds to a diagnostic message. Ideally, each |
6 # entry contains three parts: | 6 # entry contains three parts: |
7 # | 7 # |
8 # 1. A message template (template). | 8 # 1. A message template (template). |
9 # | 9 # |
10 # 2. A suggestion for how to correct the problem (tip). | 10 # 2. A suggestion for how to correct the problem (tip). |
11 # | 11 # |
12 # 3. Examples that produce the message (one of expression, statement, | 12 # 3. Examples that produce the message (one of expression, statement, |
13 # declaration, member, script, or bytes). | 13 # declaration, member, script, or bytes). |
14 # | 14 # |
15 # In addition, an entry can contain an analyzer error code (analyzerCode). | |
Johnni Winther
2017/03/29 08:28:10
and a dart2jsCode?
ahe
2017/03/29 08:55:23
Done.
| |
16 # | |
15 # ## Parameter Substitution in Template and Tip | 17 # ## Parameter Substitution in Template and Tip |
16 # | 18 # |
17 # The fields `template` and `tip` are subject to parameter substitution. When | 19 # The fields `template` and `tip` are subject to parameter substitution. When |
18 # the compiler reports a problem, it may also specify a map with the following | 20 # the compiler reports a problem, it may also specify a map with the following |
19 # keys to be substituted into the message: | 21 # keys to be substituted into the message: |
20 # | 22 # |
21 # `#character` a Unicode character. | 23 # `#character` a Unicode character. |
22 # | 24 # |
23 # `#unicode` a Unicode short identifier (U+xxxx). We use this to represent code | 25 # `#unicode` a Unicode short identifier (U+xxxx). We use this to represent code |
24 # units or code points. | 26 # units or code points. |
25 # | 27 # |
26 # `#name` a name (a string). | 28 # `#name` a name (a string). |
27 # | 29 # |
28 # `#lexeme` a token. The token's `lexeme` property is used. | 30 # `#lexeme` a token. The token's `lexeme` property is used. |
29 # | 31 # |
30 # `#string` a string. | 32 # `#string` a string. |
31 | 33 |
32 AsciiControlCharacter: | 34 AsciiControlCharacter: |
33 template: "The control character #unicode can only be used in strings and comm ents." | 35 template: "The control character #unicode can only be used in strings and comm ents." |
36 dart2jsCode: BAD_INPUT_CHARACTER | |
34 expresssion: "\x1b 1" | 37 expresssion: "\x1b 1" |
35 | 38 |
36 NonAsciiIdentifier: | 39 NonAsciiIdentifier: |
37 template: "The non-ASCII character '#character' (#unicode) can't be used in id entifiers, only in strings and comments." | 40 template: "The non-ASCII character '#character' (#unicode) can't be used in id entifiers, only in strings and comments." |
38 tip: "Try using an US-ASCII letter, a digit, '_' (an underscore), or '$' (a do llar sign)." | 41 tip: "Try using an US-ASCII letter, a digit, '_' (an underscore), or '$' (a do llar sign)." |
42 analyzerCode: ILLEGAL_CHARACTER | |
43 dart2jsCode: BAD_INPUT_CHARACTER | |
39 expresssion: "å" | 44 expresssion: "å" |
40 | 45 |
41 NonAsciiWhitespace: | 46 NonAsciiWhitespace: |
42 template: "The non-ASCII space character #unicode can only be used in strings and comments." | 47 template: "The non-ASCII space character #unicode can only be used in strings and comments." |
48 analyzerCode: ILLEGAL_CHARACTER | |
49 dart2jsCode: BAD_INPUT_CHARACTER | |
43 expresssion: "\u2028 1" | 50 expresssion: "\u2028 1" |
44 | 51 |
45 Encoding: | 52 Encoding: |
46 template: "Unable to decode bytes as UTF-8." | 53 template: "Unable to decode bytes as UTF-8." |
54 dart2jsCode: FASTA_FATAL | |
47 bytes: [255] | 55 bytes: [255] |
48 | 56 |
49 EmptyNamedParameterList: | 57 EmptyNamedParameterList: |
50 template: "Named parameter lists cannot be empty." | 58 template: "Named parameter lists cannot be empty." |
51 tip: "Try adding a named parameter to the list." | 59 tip: "Try adding a named parameter to the list." |
60 dart2jsCode: EMPTY_NAMED_PARAMETER_LIST | |
52 script: > | 61 script: > |
53 foo({}) {} | 62 foo({}) {} |
54 | 63 |
55 main() { | 64 main() { |
56 foo(); | 65 foo(); |
57 } | 66 } |
58 | 67 |
59 EmptyOptionalParameterList: | 68 EmptyOptionalParameterList: |
60 template: "Optional parameter lists cannot be empty." | 69 template: "Optional parameter lists cannot be empty." |
61 tip: "Try adding an optional parameter to the list." | 70 tip: "Try adding an optional parameter to the list." |
71 dart2jsCode: EMPTY_OPTIONAL_PARAMETER_LIST | |
62 script: > | 72 script: > |
63 foo([]) {} | 73 foo([]) {} |
64 | 74 |
65 main() { | 75 main() { |
66 foo(); | 76 foo(); |
67 } | 77 } |
68 | 78 |
69 ExpectedBlockToSkip: ExpectedBody | 79 ExpectedBlockToSkip: |
80 template: "Expected a function body or '=>'." | |
81 # TODO(ahe): In some scenarios, we can suggest removing the 'static' keyword. | |
82 tip: "Try adding {}." | |
83 dart2jsCode: NATIVE_OR_BODY_EXPECTED | |
84 script: "main();" | |
70 | 85 |
71 ExpectedBody: | 86 ExpectedBody: |
72 template: "Expected a function body or '=>'." | 87 template: "Expected a function body or '=>'." |
73 # TODO(ahe): In some scenarios, we can suggest removing the 'static' keyword. | 88 # TODO(ahe): In some scenarios, we can suggest removing the 'static' keyword. |
74 tip: "Try adding {}." | 89 tip: "Try adding {}." |
90 dart2jsCode: BODY_EXPECTED | |
75 script: "main();" | 91 script: "main();" |
76 | 92 |
77 ExpectedButGot: | 93 ExpectedButGot: |
78 template: "Expected '#lexeme' before this." | 94 template: "Expected '#string' before this." |
79 # Consider the second example below: the parser expects a ')' before 'y', but | 95 # Consider the second example below: the parser expects a ')' before 'y', but |
80 # a ',' would also have worked. We don't have enough information to give a | 96 # a ',' would also have worked. We don't have enough information to give a |
81 # good suggestion. | 97 # good suggestion. |
82 tip: DONT_KNOW_HOW_TO_FIX, | 98 tip: DONT_KNOW_HOW_TO_FIX, |
99 dart2jsCode: MISSING_TOKEN_BEFORE_THIS | |
83 script: | 100 script: |
84 - "main() => true ? 1;" | 101 - "main() => true ? 1;" |
85 - "main() => foo(x: 1 y: 2);" | 102 - "main() => foo(x: 1 y: 2);" |
86 | 103 |
87 ExpectedClassBody: | 104 ExpectedClassBody: |
88 template: "Expected a class body, but got '#lexeme'." | 105 template: "Expected a class body, but got '#lexeme'." |
106 dart2jsCode: FASTA_FATAL | |
89 | 107 |
90 ExpectedClassBodyToSkip: ExpectedClassBody | 108 ExpectedClassBodyToSkip: ExpectedClassBody |
91 | 109 |
92 ExpectedDeclaration: | 110 ExpectedDeclaration: |
93 template: "Expected a declaration, but got '#lexeme'." | 111 template: "Expected a declaration, but got '#lexeme'." |
112 dart2jsCode: FASTA_FATAL | |
94 | 113 |
95 ExpectedExpression: | 114 ExpectedExpression: |
96 template: "Expected an expression, but got '#lexeme'." | 115 template: "Expected an expression, but got '#lexeme'." |
116 dart2jsCode: FASTA_FATAL | |
97 | 117 |
98 ExpectedFunctionBody: | 118 ExpectedFunctionBody: |
99 template: "Expected a function body, but got '#lexeme'." | 119 template: "Expected a function body, but got '#lexeme'." |
120 dart2jsCode: NATIVE_OR_FATAL | |
100 | 121 |
101 ExpectedHexDigit: | 122 ExpectedHexDigit: |
102 template: "A hex digit (0-9 or A-F) must follow '0x'." | 123 template: "A hex digit (0-9 or A-F) must follow '0x'." |
103 # No tip, seems obvious from the error message. | 124 # No tip, seems obvious from the error message. |
125 analyzerCode: MISSING_HEX_DIGIT | |
126 dart2jsCode: HEX_DIGIT_EXPECTED | |
104 script: > | 127 script: > |
105 main() { | 128 main() { |
106 var i = 0x; | 129 var i = 0x; |
107 } | 130 } |
108 | 131 |
109 ExpectedIdentifier: | 132 ExpectedIdentifier: |
110 template: "'#lexeme' is a reserved word and can't be used here." | 133 template: "'#lexeme' is a reserved word and can't be used here." |
111 tip: "Try using a different name." | 134 tip: "Try using a different name." |
135 dart2jsCode: EXPECTED_IDENTIFIER | |
112 script: "do() {} main() {}" | 136 script: "do() {} main() {}" |
113 | 137 |
114 ExpectedOpenParens: | 138 ExpectedOpenParens: |
115 template: "Expected '('." | 139 template: "Expected '('." |
140 dart2jsCode: GENERIC | |
116 | 141 |
117 ExpectedString: | 142 ExpectedString: |
118 template: "Expected a String, but got '#lexeme'." | 143 template: "Expected a String, but got '#lexeme'." |
144 dart2jsCode: FASTA_FATAL | |
119 | 145 |
120 ExpectedType: | 146 ExpectedType: |
121 template: "Expected a type, but got '#lexeme'." | 147 template: "Expected a type, but got '#lexeme'." |
148 dart2jsCode: FASTA_FATAL | |
122 | 149 |
123 ExtraneousModifier: | 150 ExtraneousModifier: |
124 template: "Can't have modifier '#lexeme' here." | 151 template: "Can't have modifier '#lexeme' here." |
125 tip: "Try removing '#lexeme'." | 152 tip: "Try removing '#lexeme'." |
153 dart2jsCode: EXTRANEOUS_MODIFIER | |
126 script: | 154 script: |
127 - "var String foo; main(){}" | 155 - "var String foo; main(){}" |
128 - "var set foo; main(){}" | 156 - "var set foo; main(){}" |
129 - "var final foo; main(){}" | 157 - "var final foo; main(){}" |
130 - "var var foo; main(){}" | 158 - "var var foo; main(){}" |
131 - "var const foo; main(){}" | 159 - "var const foo; main(){}" |
132 - "var abstract foo; main(){}" | 160 - "var abstract foo; main(){}" |
133 - "var static foo; main(){}" | 161 - "var static foo; main(){}" |
134 - "var external foo; main(){}" | 162 - "var external foo; main(){}" |
135 - "get var foo; main(){}" | 163 - "get var foo; main(){}" |
136 - "set var foo; main(){}" | 164 - "set var foo; main(){}" |
137 - "final var foo; main(){}" | 165 - "final var foo; main(){}" |
138 - "var var foo; main(){}" | 166 - "var var foo; main(){}" |
139 - "const var foo; main(){}" | 167 - "const var foo; main(){}" |
140 - "abstract var foo; main(){}" | 168 - "abstract var foo; main(){}" |
141 - "static var foo; main(){}" | 169 - "static var foo; main(){}" |
142 - "external var foo; main(){}" | 170 - "external var foo; main(){}" |
143 | 171 |
144 ExtraneousModifierReplace: | 172 ExtraneousModifierReplace: |
145 template: "Can't have modifier '#lexeme' here." | 173 template: "Can't have modifier '#lexeme' here." |
146 tip: "Try replacing modifier '#lexeme' with 'var', 'final', or a type." | 174 tip: "Try replacing modifier '#lexeme' with 'var', 'final', or a type." |
175 dart2jsCode: EXTRANEOUS_MODIFIER_REPLACE | |
147 script: | 176 script: |
148 - "set foo; main(){}" | 177 - "set foo; main(){}" |
149 - "abstract foo; main(){}" | 178 - "abstract foo; main(){}" |
150 - "static foo; main(){}" | 179 - "static foo; main(){}" |
151 - "external foo; main(){}" | 180 - "external foo; main(){}" |
152 | 181 |
153 InvalidAwaitFor: | 182 InvalidAwaitFor: |
154 template: "'await' is only supported in methods with an 'async' or 'async*' bo dy modifier." | 183 template: "'await' is only supported in methods with an 'async' or 'async*' bo dy modifier." |
155 tip: "Try adding 'async' or 'async*' to the method body or removing the 'await ' keyword." | 184 tip: "Try adding 'async' or 'async*' to the method body or removing the 'await ' keyword." |
185 dart2jsCode: INVALID_AWAIT_FOR | |
156 script: > | 186 script: > |
157 main(o) sync* { | 187 main(o) sync* { |
158 await for (var e in o) {} | 188 await for (var e in o) {} |
159 } | 189 } |
160 | 190 |
161 InvalidSyncModifier: | 191 InvalidSyncModifier: |
162 template: "Invalid modifier 'sync'." | 192 template: "Invalid modifier 'sync'." |
163 tip: "Try replacing 'sync' with 'sync*'." | 193 tip: "Try replacing 'sync' with 'sync*'." |
194 dart2jsCode: INVALID_SYNC_MODIFIER | |
164 script: "main() sync {}" | 195 script: "main() sync {}" |
165 | 196 |
166 InvalidVoid: | 197 InvalidVoid: |
167 template: "Type 'void' can't be used here because it isn't a return type." | 198 template: "Type 'void' can't be used here because it isn't a return type." |
168 tip: "Try removing 'void' keyword or replace it with 'var', 'final', or a type ." | 199 tip: "Try removing 'void' keyword or replace it with 'var', 'final', or a type ." |
200 dart2jsCode: VOID_NOT_ALLOWED | |
169 script: | 201 script: |
170 - "void x; main() {}" | 202 - "void x; main() {}" |
171 - "foo(void x) {} main() { foo(null); }" | 203 - "foo(void x) {} main() { foo(null); }" |
172 | 204 |
173 MissingExponent: | 205 MissingExponent: |
174 template: "Numbers in exponential notation should always contain an exponent ( an integer number with an optional sign)." | 206 template: "Numbers in exponential notation should always contain an exponent ( an integer number with an optional sign)." |
175 tip: "Make sure there is an exponent, and remove any whitespace before it." | 207 tip: "Make sure there is an exponent, and remove any whitespace before it." |
208 analyzerCode: MISSING_DIGIT | |
209 dart2jsCode: EXPONENT_MISSING | |
176 script: > | 210 script: > |
177 main() { | 211 main() { |
178 var i = 1e; | 212 var i = 1e; |
179 } | 213 } |
180 | 214 |
181 PositionalParameterWithEquals: | 215 PositionalParameterWithEquals: |
182 template: "Positional optional parameters can't use ':' to specify a default v alue." | 216 template: "Positional optional parameters can't use ':' to specify a default v alue." |
183 tip: "Try replacing ':' with '='." | 217 tip: "Try replacing ':' with '='." |
218 dart2jsCode: POSITIONAL_PARAMETER_WITH_EQUALS | |
184 script: > | 219 script: > |
185 main() { | 220 main() { |
186 foo([a: 1]) => print(a); | 221 foo([a: 1]) => print(a); |
187 foo(2); | 222 foo(2); |
188 } | 223 } |
189 | 224 |
190 RequiredParameterWithDefault: | 225 RequiredParameterWithDefault: |
191 template: "Non-optional parameters can't have a default value." | 226 template: "Non-optional parameters can't have a default value." |
192 tip: "Try removing the default value or making the parameter optional." | 227 tip: "Try removing the default value or making the parameter optional." |
228 dart2jsCode: REQUIRED_PARAMETER_WITH_DEFAULT | |
193 script: | 229 script: |
194 - > | 230 - > |
195 main() { | 231 main() { |
196 foo(a: 1) => print(a); | 232 foo(a: 1) => print(a); |
197 foo(2); | 233 foo(2); |
198 } | 234 } |
199 - > | 235 - > |
200 main() { | 236 main() { |
201 foo(a = 1) => print(a); | 237 foo(a = 1) => print(a); |
202 foo(2); | 238 foo(2); |
203 } | 239 } |
204 | 240 |
205 StackOverflow: | 241 StackOverflow: |
206 template: "Stack overflow." | 242 template: "Stack overflow." |
243 dart2jsCode: GENERIC | |
207 | 244 |
208 UnexpectedDollarInString: | 245 UnexpectedDollarInString: |
209 template: "A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({})." | 246 template: "A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({})." |
210 tip: "Try adding a backslash (\\) to escape the '$'." | 247 tip: "Try adding a backslash (\\) to escape the '$'." |
248 dart2jsCode: MALFORMED_STRING_LITERAL | |
211 script: | 249 script: |
212 - > | 250 - > |
213 main() { | 251 main() { |
214 return '$'; | 252 return '$'; |
215 } | 253 } |
216 - > | 254 - > |
217 main() { | 255 main() { |
218 return "$"; | 256 return "$"; |
219 } | 257 } |
220 - > | 258 - > |
221 main() { | 259 main() { |
222 return '''$'''; | 260 return '''$'''; |
223 } | 261 } |
224 - > | 262 - > |
225 main() { | 263 main() { |
226 return """$"""; | 264 return """$"""; |
227 } | 265 } |
228 | 266 |
229 UnexpectedToken: | 267 UnexpectedToken: |
230 template: "Unexpected token '#lexeme'." | 268 template: "Unexpected token '#lexeme'." |
269 dart2jsCode: FASTA_FATAL | |
231 | 270 |
232 UnmatchedToken: | 271 UnmatchedToken: |
233 template: "Can't find '#string' to match '#lexeme'." | 272 template: "Can't find '#string' to match '#lexeme'." |
273 dart2jsCode: UNMATCHED_TOKEN | |
234 script: | 274 script: |
235 - "main(" | 275 - "main(" |
236 - "main(){" | 276 - "main(){" |
237 - "main(){[}" | 277 - "main(){[}" |
238 | 278 |
239 UnsupportedPrefixPlus: | 279 UnsupportedPrefixPlus: |
240 template: "'+' is not a prefix operator. " | 280 template: "'+' is not a prefix operator. " |
241 tip: "Try removing '+'." | 281 tip: "Try removing '+'." |
282 dart2jsCode: UNSUPPORTED_PREFIX_PLUS | |
242 script: "main() => +2; // No longer a valid way to write '2'" | 283 script: "main() => +2; // No longer a valid way to write '2'" |
243 | 284 |
244 UnterminatedComment: | 285 UnterminatedComment: |
245 template: "Comment starting with '/*' must end with '*/'." | 286 template: "Comment starting with '/*' must end with '*/'." |
287 analyzerCode: UNTERMINATED_MULTI_LINE_COMMENT | |
288 dart2jsCode: UNTERMINATED_COMMENT | |
246 script: | 289 script: |
247 main() { | 290 main() { |
248 } | 291 } |
249 /* | 292 /* |
250 | 293 |
251 UnterminatedString: | 294 UnterminatedString: |
252 template: "String must end with #string." | 295 template: "String must end with #string." |
296 analyzerCode: UNTERMINATED_STRING_LITERAL | |
297 dart2jsCode: UNTERMINATED_STRING | |
253 script: | 298 script: |
254 - > | 299 - > |
255 main() { | 300 main() { |
256 return ' | 301 return ' |
257 ; | 302 ; |
258 } | 303 } |
259 - > | 304 - > |
260 main() { | 305 main() { |
261 return \" | 306 return \" |
262 ; | 307 ; |
(...skipping 13 matching lines...) Expand all Loading... | |
276 - > | 321 - > |
277 main() => \"\"\" | 322 main() => \"\"\" |
278 - > | 323 - > |
279 main() => r''' | 324 main() => r''' |
280 - > | 325 - > |
281 main() => r\"\"\" | 326 main() => r\"\"\" |
282 | 327 |
283 UnterminatedToken: | 328 UnterminatedToken: |
284 # This is a fall-back message that shouldn't happen. | 329 # This is a fall-back message that shouldn't happen. |
285 template: "Incomplete token." | 330 template: "Incomplete token." |
331 dart2jsCode: UNTERMINATED_TOKEN | |
286 | 332 |
287 Unspecified: | 333 Unspecified: |
288 template: "#string" | 334 template: "#string" |
335 dart2jsCode: GENERIC | |
289 | 336 |
290 AbstractNotSync: | 337 AbstractNotSync: |
291 template: "Abstract methods can't use 'async', 'async*', or 'sync*'." | 338 template: "Abstract methods can't use 'async', 'async*', or 'sync*'." |
339 dart2jsCode: FASTA_IGNORED | |
292 | 340 |
293 AsyncAsIdentifier: | 341 AsyncAsIdentifier: |
342 analyzerCode: ASYNC_KEYWORD_USED_AS_IDENTIFIER | |
294 template: "'async' can't be used as an identifier in 'async', 'async*', or 'sy nc*' methods." | 343 template: "'async' can't be used as an identifier in 'async', 'async*', or 'sy nc*' methods." |
344 dart2jsCode: GENERIC | |
295 | 345 |
296 AwaitAsIdentifier: | 346 AwaitAsIdentifier: |
297 template: "'await' can't be used as an identifier in 'async', 'async*', or 'sy nc*' methods." | 347 template: "'await' can't be used as an identifier in 'async', 'async*', or 'sy nc*' methods." |
348 dart2jsCode: FASTA_IGNORED | |
298 | 349 |
299 AwaitNotAsync: | 350 AwaitNotAsync: |
300 template: "'await' can only be used in 'async' or 'async*' methods." | 351 template: "'await' can only be used in 'async' or 'async*' methods." |
352 dart2jsCode: FASTA_IGNORED | |
301 | 353 |
302 BuiltInIdentifierAsType: | 354 BuiltInIdentifierAsType: |
303 template: "Can't use '#lexeme' as a type." | 355 template: "Can't use '#lexeme' as a type." |
356 dart2jsCode: GENERIC | |
304 | 357 |
305 BuiltInIdentifierInDeclaration: | 358 BuiltInIdentifierInDeclaration: |
306 template: "Can't use '#lexeme' as a name here." | 359 template: "Can't use '#lexeme' as a name here." |
360 dart2jsCode: GENERIC | |
307 | 361 |
308 AwaitForNotAsync: | 362 AwaitForNotAsync: |
309 template: "Asynchronous for-loop can only be used in 'async' or 'async*' metho ds." | 363 template: "Asynchronous for-loop can only be used in 'async' or 'async*' metho ds." |
364 dart2jsCode: FASTA_IGNORED | |
310 | 365 |
311 FactoryNotSync: | 366 FactoryNotSync: |
312 template: "Factories can't use 'async', 'async*', or 'sync*'." | 367 template: "Factories can't use 'async', 'async*', or 'sync*'." |
368 dart2jsCode: FASTA_IGNORED | |
313 | 369 |
314 GeneratorReturnsValue: | 370 GeneratorReturnsValue: |
315 template: "'sync*' and 'async*' can't return a value." | 371 template: "'sync*' and 'async*' can't return a value." |
372 dart2jsCode: FASTA_IGNORED | |
316 | 373 |
317 InvalidInlineFunctionType: | 374 InvalidInlineFunctionType: |
318 template: "Invalid inline function type." | 375 template: "Invalid inline function type." |
319 tip: "Try changing the inline function type (as in 'int f()') to a prefixed fu nction type using the `Function` keyword (as in 'int Function() f')." | 376 tip: "Try changing the inline function type (as in 'int f()') to a prefixed fu nction type using the `Function` keyword (as in 'int Function() f')." |
377 dart2jsCode: INVALID_INLINE_FUNCTION_TYPE | |
320 declaration: "typedef F = Function(int f(String x)); main() { F f; }" | 378 declaration: "typedef F = Function(int f(String x)); main() { F f; }" |
321 | 379 |
322 SetterNotSync: | 380 SetterNotSync: |
323 template: "Setters can't use 'async', 'async*', or 'sync*'." | 381 template: "Setters can't use 'async', 'async*', or 'sync*'." |
382 dart2jsCode: FASTA_IGNORED | |
324 | 383 |
325 YieldAsIdentifier: | 384 YieldAsIdentifier: |
326 template: "'yield' can't be used as an identifier in 'async', 'async*', or 'sy nc*' methods." | 385 template: "'yield' can't be used as an identifier in 'async', 'async*', or 'sy nc*' methods." |
386 dart2jsCode: FASTA_IGNORED | |
327 | 387 |
328 YieldNotGenerator: | 388 YieldNotGenerator: |
329 template: "'yield' can only be used in 'sync*' or 'async*' methods." | 389 template: "'yield' can only be used in 'sync*' or 'async*' methods." |
390 dart2jsCode: FASTA_IGNORED | |
330 | 391 |
331 OnlyTry: | 392 OnlyTry: |
332 template: "Try block should be followed by 'on', 'catch', or 'finally' block." | 393 template: "Try block should be followed by 'on', 'catch', or 'finally' block." |
333 tip: "Did you forget to add a 'finally' block?" | 394 tip: "Did you forget to add a 'finally' block?" |
334 statement: "try {}" | 395 statement: "try {}" |
396 dart2jsCode: FASTA_IGNORED | |
OLD | NEW |