OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 /** | 5 /** |
6 * This library is capable of producing linked summaries from unlinked | 6 * This library is capable of producing linked summaries from unlinked |
7 * ones (or prelinked ones). It functions by building a miniature | 7 * ones (or prelinked ones). It functions by building a miniature |
8 * element model to represent the contents of the summaries, and then | 8 * element model to represent the contents of the summaries, and then |
9 * scanning the element model to gather linked information and adding | 9 * scanning the element model to gather linked information and adding |
10 * it to the summary data structures. | 10 * it to the summary data structures. |
(...skipping 3883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3894 * The index of this parameter within [enclosingElement]'s parameter list. | 3894 * The index of this parameter within [enclosingElement]'s parameter list. |
3895 */ | 3895 */ |
3896 final int _parameterIndex; | 3896 final int _parameterIndex; |
3897 | 3897 |
3898 @override | 3898 @override |
3899 final ParameterParentElementForLink enclosingElement; | 3899 final ParameterParentElementForLink enclosingElement; |
3900 | 3900 |
3901 DartType _inferredType; | 3901 DartType _inferredType; |
3902 DartType _declaredType; | 3902 DartType _declaredType; |
3903 | 3903 |
| 3904 @override |
| 3905 bool inheritsCovariant = false; |
| 3906 |
3904 ParameterElementForLink(this.enclosingElement, this._unlinkedParam, | 3907 ParameterElementForLink(this.enclosingElement, this._unlinkedParam, |
3905 this._typeParameterContext, this.compilationUnit, this._parameterIndex) { | 3908 this._typeParameterContext, this.compilationUnit, this._parameterIndex) { |
3906 if (_unlinkedParam.initializer?.bodyExpr != null) { | 3909 if (_unlinkedParam.initializer?.bodyExpr != null) { |
3907 _constNode = new ConstParameterNode(this); | 3910 _constNode = new ConstParameterNode(this); |
3908 } | 3911 } |
3909 } | 3912 } |
3910 | 3913 |
3911 @override | 3914 @override |
3912 String get displayName => _unlinkedParam.name; | 3915 String get displayName => _unlinkedParam.name; |
3913 | 3916 |
3914 @override | 3917 @override |
3915 bool get hasImplicitType => | 3918 bool get hasImplicitType => |
3916 !_unlinkedParam.isFunctionTyped && _unlinkedParam.type == null; | 3919 !_unlinkedParam.isFunctionTyped && _unlinkedParam.type == null; |
3917 | 3920 |
3918 @override | 3921 @override |
| 3922 bool get isCovariant => false; |
| 3923 |
| 3924 @override |
3919 String get name => _unlinkedParam.name; | 3925 String get name => _unlinkedParam.name; |
3920 | 3926 |
3921 @override | 3927 @override |
3922 ParameterKind get parameterKind { | 3928 ParameterKind get parameterKind { |
3923 switch (_unlinkedParam.kind) { | 3929 switch (_unlinkedParam.kind) { |
3924 case UnlinkedParamKind.required: | 3930 case UnlinkedParamKind.required: |
3925 return ParameterKind.REQUIRED; | 3931 return ParameterKind.REQUIRED; |
3926 case UnlinkedParamKind.positional: | 3932 case UnlinkedParamKind.positional: |
3927 return ParameterKind.POSITIONAL; | 3933 return ParameterKind.POSITIONAL; |
3928 case UnlinkedParamKind.named: | 3934 case UnlinkedParamKind.named: |
(...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4956 * there are no type parameters in scope. | 4962 * there are no type parameters in scope. |
4957 */ | 4963 */ |
4958 TypeParameterizedElementMixin get _typeParameterContext; | 4964 TypeParameterizedElementMixin get _typeParameterContext; |
4959 | 4965 |
4960 @override | 4966 @override |
4961 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); | 4967 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); |
4962 | 4968 |
4963 @override | 4969 @override |
4964 String toString() => '$enclosingElement.$name'; | 4970 String toString() => '$enclosingElement.$name'; |
4965 } | 4971 } |
OLD | NEW |