| 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 'package:analyzer/src/generated/ast.dart' show AstNode; | 9 import 'package:analyzer/src/generated/ast.dart' show AstNode; |
| 10 import 'package:analyzer/src/generated/element.dart'; | 10 import 'package:analyzer/src/generated/element.dart'; |
| (...skipping 4956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4967 'INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL', | 4967 'INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL', |
| 4968 "Parameters cannot override default values, this method overrides '{0}
.{1}' where this positional parameter has a different value"); | 4968 "Parameters cannot override default values, this method overrides '{0}
.{1}' where this positional parameter has a different value"); |
| 4969 | 4969 |
| 4970 /** | 4970 /** |
| 4971 * 7.1 Instance Methods: It is a static warning if an instance method | 4971 * 7.1 Instance Methods: It is a static warning if an instance method |
| 4972 * <i>m1</i> overrides an instance member <i>m2</i> and <i>m1</i> does not | 4972 * <i>m1</i> overrides an instance member <i>m2</i> and <i>m1</i> does not |
| 4973 * declare all the named parameters declared by <i>m2</i>. | 4973 * declare all the named parameters declared by <i>m2</i>. |
| 4974 * | 4974 * |
| 4975 * Parameters: | 4975 * Parameters: |
| 4976 * 0: the number of named parameters in the overridden member | 4976 * 0: the number of named parameters in the overridden member |
| 4977 * 1: the name of the class from the overridden method | 4977 * 1: the signature of the overridden member |
| 4978 * 2: the name of the class from the overridden method |
| 4978 */ | 4979 */ |
| 4979 static const StaticWarningCode INVALID_OVERRIDE_NAMED = const StaticWarningCod
e( | 4980 static const StaticWarningCode INVALID_OVERRIDE_NAMED = const StaticWarningCod
e( |
| 4980 'INVALID_OVERRIDE_NAMED', | 4981 'INVALID_OVERRIDE_NAMED', |
| 4981 "Missing the named parameter '{0}' to match the overridden method from '{1
}'"); | 4982 "Missing the named parameter '{0}' to match the overridden method from '{1
}' from '{2}'"); |
| 4982 | 4983 |
| 4983 /** | 4984 /** |
| 4984 * 7.1 Instance Methods: It is a static warning if an instance method | 4985 * 7.1 Instance Methods: It is a static warning if an instance method |
| 4985 * <i>m1</i> overrides an instance member <i>m2</i> and <i>m1</i> has fewer | 4986 * <i>m1</i> overrides an instance member <i>m2</i> and <i>m1</i> has fewer |
| 4986 * positional parameters than <i>m2</i>. | 4987 * positional parameters than <i>m2</i>. |
| 4987 * | 4988 * |
| 4988 * Parameters: | 4989 * Parameters: |
| 4989 * 0: the number of positional parameters in the overridden member | 4990 * 0: the number of positional parameters in the overridden member |
| 4990 * 1: the name of the class from the overridden method | 4991 * 1: the signature of the overridden member |
| 4992 * 2: the name of the class from the overridden method |
| 4991 */ | 4993 */ |
| 4992 static const StaticWarningCode INVALID_OVERRIDE_POSITIONAL = | 4994 static const StaticWarningCode INVALID_OVERRIDE_POSITIONAL = |
| 4993 const StaticWarningCode('INVALID_OVERRIDE_POSITIONAL', | 4995 const StaticWarningCode('INVALID_OVERRIDE_POSITIONAL', |
| 4994 "Must have at least {0} parameters to match the overridden method from
'{1}'"); | 4996 "Must have at least {0} parameters to match the overridden method '{1}
' from '{2}'"); |
| 4995 | 4997 |
| 4996 /** | 4998 /** |
| 4997 * 7.1 Instance Methods: It is a static warning if an instance method | 4999 * 7.1 Instance Methods: It is a static warning if an instance method |
| 4998 * <i>m1</i> overrides an instance member <i>m2</i> and <i>m1</i> has a | 5000 * <i>m1</i> overrides an instance member <i>m2</i> and <i>m1</i> has a |
| 4999 * greater number of required parameters than <i>m2</i>. | 5001 * greater number of required parameters than <i>m2</i>. |
| 5000 * | 5002 * |
| 5001 * Parameters: | 5003 * Parameters: |
| 5002 * 0: the number of required parameters in the overridden member | 5004 * 0: the number of required parameters in the overridden member |
| 5003 * 1: the name of the class from the overridden method | 5005 * 1: the signature of the overridden member |
| 5006 * 2: the name of the class from the overridden method |
| 5004 */ | 5007 */ |
| 5005 static const StaticWarningCode INVALID_OVERRIDE_REQUIRED = | 5008 static const StaticWarningCode INVALID_OVERRIDE_REQUIRED = |
| 5006 const StaticWarningCode('INVALID_OVERRIDE_REQUIRED', | 5009 const StaticWarningCode('INVALID_OVERRIDE_REQUIRED', |
| 5007 "Must have {0} required parameters or less to match the overridden met
hod from '{1}'"); | 5010 "Must have {0} required parameters or less to match the overridden met
hod '{1}' from '{2}'"); |
| 5008 | 5011 |
| 5009 /** | 5012 /** |
| 5010 * 7.3 Setters: It is a static warning if a setter <i>m1</i> overrides a | 5013 * 7.3 Setters: It is a static warning if a setter <i>m1</i> overrides a |
| 5011 * setter <i>m2</i> and the type of <i>m1</i> is not a subtype of the type of | 5014 * setter <i>m2</i> and the type of <i>m1</i> is not a subtype of the type of |
| 5012 * <i>m2</i>. | 5015 * <i>m2</i>. |
| 5013 * | 5016 * |
| 5014 * Parameters: | 5017 * Parameters: |
| 5015 * 0: the name of the actual parameter type | 5018 * 0: the name of the actual parameter type |
| 5016 * 1: the name of the expected parameter type, not assignable to the actual | 5019 * 1: the name of the expected parameter type, not assignable to the actual |
| 5017 * parameter type | 5020 * parameter type |
| (...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5653 * Initialize a newly created error code to have the given [name]. | 5656 * Initialize a newly created error code to have the given [name]. |
| 5654 */ | 5657 */ |
| 5655 const TodoCode(String name) : super(name, "{0}"); | 5658 const TodoCode(String name) : super(name, "{0}"); |
| 5656 | 5659 |
| 5657 @override | 5660 @override |
| 5658 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; | 5661 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; |
| 5659 | 5662 |
| 5660 @override | 5663 @override |
| 5661 ErrorType get type => ErrorType.TODO; | 5664 ErrorType get type => ErrorType.TODO; |
| 5662 } | 5665 } |
| OLD | NEW |