| 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). |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 main() => r''' | 279 main() => r''' |
| 280 - > | 280 - > |
| 281 main() => r\"\"\" | 281 main() => r\"\"\" |
| 282 | 282 |
| 283 UnterminatedToken: | 283 UnterminatedToken: |
| 284 # This is a fall-back message that shouldn't happen. | 284 # This is a fall-back message that shouldn't happen. |
| 285 template: "Incomplete token." | 285 template: "Incomplete token." |
| 286 | 286 |
| 287 Unspecified: | 287 Unspecified: |
| 288 template: "#string" | 288 template: "#string" |
| 289 |
| 290 AbstractNotSync: |
| 291 template: "Abstract methods can't use 'async', 'async*', or 'sync*'." |
| 292 |
| 293 AsyncAsIdentifier: |
| 294 template: "'async' can't be used as an identifier in 'async', 'async*', or 'sy
nc*' methods." |
| 295 |
| 296 AwaitAsIdentifier: |
| 297 template: "'await' can't be used as an identifier in 'async', 'async*', or 'sy
nc*' methods." |
| 298 |
| 299 AwaitNotAsync: |
| 300 template: "'await' can only be used in 'async' or 'async*' methods." |
| 301 |
| 302 BuiltInIdentifierAsType: |
| 303 template: "Can't use '#lexeme' as a type." |
| 304 |
| 305 BuiltInIdentifierInDeclaration: |
| 306 template: "Can't use '#lexeme' as a name here." |
| 307 |
| 308 AwaitForNotAsync: |
| 309 template: "Asynchronous for-loop can only be used in 'async' or 'async*' metho
ds." |
| 310 |
| 311 FactoryNotSync: |
| 312 template: "Factories can't use 'async', 'async*', or 'sync*'." |
| 313 |
| 314 GeneratorReturnsValue: |
| 315 template: "'sync*' and 'async*' can't return a value." |
| 316 |
| 317 InvalidInlineFunctionType: |
| 318 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')." |
| 320 declaration: "typedef F = Function(int f(String x)); main() { F f; }" |
| 321 |
| 322 SetterNotSync: |
| 323 template: "Setters can't use 'async', 'async*', or 'sync*'." |
| 324 |
| 325 YieldAsIdentifier: |
| 326 template: "'yield' can't be used as an identifier in 'async', 'async*', or 'sy
nc*' methods." |
| 327 |
| 328 YieldNotGenerator: |
| 329 template: "'yield' can only be used in 'sync*' or 'async*' methods." |
| OLD | NEW |