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 /// Mixins that implement convenience methods on [Element] subclasses. | 5 /// Mixins that implement convenience methods on [Element] subclasses. |
6 | 6 |
7 library elements.common; | 7 library elements.common; |
8 | 8 |
9 import '../common/names.dart' show | 9 import '../common/names.dart' show |
10 Names, | 10 Names, |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 @override | 69 @override |
70 bool get isAbstractField => kind == ElementKind.ABSTRACT_FIELD; | 70 bool get isAbstractField => kind == ElementKind.ABSTRACT_FIELD; |
71 | 71 |
72 @override | 72 @override |
73 bool get isParameter => kind == ElementKind.PARAMETER; | 73 bool get isParameter => kind == ElementKind.PARAMETER; |
74 | 74 |
75 @override | 75 @override |
76 bool get isInitializingFormal => kind == ElementKind.INITIALIZING_FORMAL; | 76 bool get isInitializingFormal => kind == ElementKind.INITIALIZING_FORMAL; |
77 | 77 |
78 @override | 78 @override |
79 bool get isErroneous => kind == ElementKind.ERROR; | 79 bool get isError => kind == ElementKind.ERROR; |
80 | 80 |
81 @override | 81 @override |
82 bool get isAmbiguous => kind == ElementKind.AMBIGUOUS; | 82 bool get isAmbiguous => kind == ElementKind.AMBIGUOUS; |
83 | 83 |
84 @override | 84 @override |
| 85 bool get isMalformed => false; |
| 86 |
| 87 @override |
85 bool get isWarnOnUse => kind == ElementKind.WARN_ON_USE; | 88 bool get isWarnOnUse => kind == ElementKind.WARN_ON_USE; |
86 | 89 |
87 @override | 90 @override |
88 bool get impliesType => (kind.category & ElementCategory.IMPLIES_TYPE) != 0; | 91 bool get impliesType => (kind.category & ElementCategory.IMPLIES_TYPE) != 0; |
89 | 92 |
90 @override | 93 @override |
91 Element get declaration => this; | 94 Element get declaration => this; |
92 | 95 |
93 @override | 96 @override |
94 Element get implementation => this; | 97 Element get implementation => this; |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 // this signature must not have more required parameters. Having more | 487 // this signature must not have more required parameters. Having more |
485 // optional parameters is not a problem, they simply are never provided | 488 // optional parameters is not a problem, they simply are never provided |
486 // by call sites of a call to a method with the other signature. | 489 // by call sites of a call to a method with the other signature. |
487 int otherTotalCount = signature.parameterCount; | 490 int otherTotalCount = signature.parameterCount; |
488 return requiredParameterCount <= otherTotalCount | 491 return requiredParameterCount <= otherTotalCount |
489 && parameterCount >= otherTotalCount; | 492 && parameterCount >= otherTotalCount; |
490 } | 493 } |
491 return true; | 494 return true; |
492 } | 495 } |
493 } | 496 } |
OLD | NEW |