| 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 // An update to this file must be followed by regenerating the corresponding | 5 // An update to this file must be followed by regenerating the corresponding |
| 6 // json, dart2js and analyzer file. Use `publish.dart` in the bin directory. | 6 // json, dart2js and analyzer file. Use `publish.dart` in the bin directory. |
| 7 // | 7 // |
| 8 // Every message in this file must have an id. Use `message_id.dart` in the | 8 // Every message in this file must have an id. Use `message_id.dart` in the |
| 9 // bin directory to generate a fresh one. | 9 // bin directory to generate a fresh one. |
| 10 | 10 |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 analyzer | 378 analyzer |
| 379 ], | 379 ], |
| 380 examples: const [ | 380 examples: const [ |
| 381 "var const x = 499; main() {}", | 381 "var const x = 499; main() {}", |
| 382 "const var x = 499; main() {}", | 382 "const var x = 499; main() {}", |
| 383 "class A { var const x = 499; } main() {}", | 383 "class A { var const x = 499; } main() {}", |
| 384 "class A { const var x = 499; } main() {}", | 384 "class A { const var x = 499; } main() {}", |
| 385 ]), | 385 ]), |
| 386 | 386 |
| 387 'CLASS_IN_CLASS': new Message( | 387 'CLASS_IN_CLASS': new Message( |
| 388 // Dart2js currently reports this as an EXTRANEOUS_MODIFIER error. |
| 389 // TODO(floitsch): make dart2js use this error instead. |
| 388 id: 'DOTHQH', | 390 id: 'DOTHQH', |
| 389 category: Category.parserError, | 391 category: Category.parserError, |
| 390 template: "Classes can't be declared inside other classes.", | 392 template: "Classes can't be declared inside other classes.", |
| 391 howToFix: "Try moving the class to the top-level.", | 393 howToFix: "Try moving the class to the top-level.", |
| 392 usedBy: [analyzer], | 394 usedBy: [analyzer], |
| 393 examples: const ["class A { class B {} } main() {}",]), | 395 examples: const ["class A { class B {} } main() { new A(); }",]), |
| 394 | 396 |
| 395 'CONSTRUCTOR_WITH_RETURN_TYPE': new Message( | 397 'CONSTRUCTOR_WITH_RETURN_TYPE': new Message( |
| 396 id: 'VOJBWY', | 398 id: 'VOJBWY', |
| 397 category: Category.parserError, | 399 category: Category.parserError, |
| 398 template: "Constructors can't have a return type", | 400 template: "Constructors can't have a return type", |
| 399 howToFix: "Try removing the return type.", | 401 howToFix: "Try removing the return type.", |
| 400 usedBy: [analyzer], | 402 usedBy: [analyzer, dart2js], |
| 401 examples: const ["class A { int A() {} } main() {}",]), | 403 examples: const ["class A { int A() {} } main() { new A(); }",]), |
| 402 }; | 404 }; |
| OLD | NEW |