| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library engine.error; | 5 library engine.error; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'ast.dart' show AstNode; | 9 import 'ast.dart' show AstNode; |
| 10 import 'element.dart'; | 10 import 'element.dart'; |
| (...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 595 const CompileTimeErrorCode('CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD', | 595 const CompileTimeErrorCode('CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD', |
| 596 "'{0}' cannot be used to name a constructor and a method in this class
"); | 596 "'{0}' cannot be used to name a constructor and a method in this class
"); |
| 597 | 597 |
| 598 /** | 598 /** |
| 599 * 7. Classes: It is a compile time error if a generic class declares a type | 599 * 7. Classes: It is a compile time error if a generic class declares a type |
| 600 * variable with the same name as the class or any of its members or | 600 * variable with the same name as the class or any of its members or |
| 601 * constructors. | 601 * constructors. |
| 602 */ | 602 */ |
| 603 static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_CLASS = | 603 static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_CLASS = |
| 604 const CompileTimeErrorCode('CONFLICTING_TYPE_VARIABLE_AND_CLASS', | 604 const CompileTimeErrorCode('CONFLICTING_TYPE_VARIABLE_AND_CLASS', |
| 605 "'{0}' cannot be used to name a type varaible in a class with the same
name"); | 605 "'{0}' cannot be used to name a type variable in a class with the same
name"); |
| 606 | 606 |
| 607 /** | 607 /** |
| 608 * 7. Classes: It is a compile time error if a generic class declares a type | 608 * 7. Classes: It is a compile time error if a generic class declares a type |
| 609 * variable with the same name as the class or any of its members or | 609 * variable with the same name as the class or any of its members or |
| 610 * constructors. | 610 * constructors. |
| 611 */ | 611 */ |
| 612 static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_MEMBER = | 612 static const CompileTimeErrorCode CONFLICTING_TYPE_VARIABLE_AND_MEMBER = |
| 613 const CompileTimeErrorCode('CONFLICTING_TYPE_VARIABLE_AND_MEMBER', | 613 const CompileTimeErrorCode('CONFLICTING_TYPE_VARIABLE_AND_MEMBER', |
| 614 "'{0}' cannot be used to name a type varaible and member in this class
"); | 614 "'{0}' cannot be used to name a type variable and member in this class
"); |
| 615 | 615 |
| 616 /** | 616 /** |
| 617 * 12.11.2 Const: It is a compile-time error if evaluation of a constant | 617 * 12.11.2 Const: It is a compile-time error if evaluation of a constant |
| 618 * object results in an uncaught exception being thrown. | 618 * object results in an uncaught exception being thrown. |
| 619 */ | 619 */ |
| 620 static const CompileTimeErrorCode CONST_CONSTRUCTOR_THROWS_EXCEPTION = | 620 static const CompileTimeErrorCode CONST_CONSTRUCTOR_THROWS_EXCEPTION = |
| 621 const CompileTimeErrorCode('CONST_CONSTRUCTOR_THROWS_EXCEPTION', | 621 const CompileTimeErrorCode('CONST_CONSTRUCTOR_THROWS_EXCEPTION', |
| 622 "'const' constructors cannot throw exceptions"); | 622 "'const' constructors cannot throw exceptions"); |
| 623 | 623 |
| 624 /** | 624 /** |
| (...skipping 2465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3090 "The exception variable '{0}' is not used, so the 'catch' clause can be re
moved"); | 3090 "The exception variable '{0}' is not used, so the 'catch' clause can be re
moved"); |
| 3091 | 3091 |
| 3092 /** | 3092 /** |
| 3093 * Unused catch stack trace variables. | 3093 * Unused catch stack trace variables. |
| 3094 */ | 3094 */ |
| 3095 static const HintCode UNUSED_CATCH_STACK = const HintCode( | 3095 static const HintCode UNUSED_CATCH_STACK = const HintCode( |
| 3096 'UNUSED_CATCH_STACK', | 3096 'UNUSED_CATCH_STACK', |
| 3097 "The stack trace variable '{0}' is not used and can be removed"); | 3097 "The stack trace variable '{0}' is not used and can be removed"); |
| 3098 | 3098 |
| 3099 /** | 3099 /** |
| 3100 * Unused local variables are local varaibles which are never read. | 3100 * Unused local variables are local variables which are never read. |
| 3101 */ | 3101 */ |
| 3102 static const HintCode UNUSED_LOCAL_VARIABLE = const HintCode( | 3102 static const HintCode UNUSED_LOCAL_VARIABLE = const HintCode( |
| 3103 'UNUSED_LOCAL_VARIABLE', | 3103 'UNUSED_LOCAL_VARIABLE', |
| 3104 "The value of the local variable '{0}' is not used"); | 3104 "The value of the local variable '{0}' is not used"); |
| 3105 | 3105 |
| 3106 /** | 3106 /** |
| 3107 * Hint for cases where the source expects a method or function to return a | 3107 * Hint for cases where the source expects a method or function to return a |
| 3108 * non-void result, but the method or function signature returns void. | 3108 * non-void result, but the method or function signature returns void. |
| 3109 * | 3109 * |
| 3110 * Parameters: | 3110 * Parameters: |
| (...skipping 1888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4999 * Initialize a newly created error code to have the given [name]. | 4999 * Initialize a newly created error code to have the given [name]. |
| 5000 */ | 5000 */ |
| 5001 const TodoCode(String name) : super(name, "{0}"); | 5001 const TodoCode(String name) : super(name, "{0}"); |
| 5002 | 5002 |
| 5003 @override | 5003 @override |
| 5004 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; | 5004 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; |
| 5005 | 5005 |
| 5006 @override | 5006 @override |
| 5007 ErrorType get type => ErrorType.TODO; | 5007 ErrorType get type => ErrorType.TODO; |
| 5008 } | 5008 } |
| OLD | NEW |