Index: pkg/analyzer/lib/src/dart/element/element.dart |
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart |
index d407317ca9a387796d8cb3b4fde008baedbf31a0..edab53970d7cdcda8a5918a00ad45ad44d433d43 100644 |
--- a/pkg/analyzer/lib/src/dart/element/element.dart |
+++ b/pkg/analyzer/lib/src/dart/element/element.dart |
@@ -5778,7 +5778,7 @@ class ParameterElementImpl extends VariableElementImpl |
/** |
* The kind of this parameter. |
*/ |
- ParameterKind parameterKind; |
+ ParameterKind _parameterKind; |
/** |
* The Dart code of the default value. |
@@ -5948,6 +5948,29 @@ class ParameterElementImpl extends VariableElementImpl |
} |
@override |
+ ParameterKind get parameterKind { |
+ if (_unlinkedParam != null && _parameterKind == null) { |
+ switch (_unlinkedParam.kind) { |
+ case UnlinkedParamKind.named: |
+ _parameterKind = ParameterKind.NAMED; |
+ break; |
+ case UnlinkedParamKind.positional: |
+ _parameterKind = ParameterKind.POSITIONAL; |
+ break; |
+ case UnlinkedParamKind.required: |
+ _parameterKind = ParameterKind.REQUIRED; |
+ break; |
+ } |
+ } |
+ return _parameterKind; |
+ } |
+ |
+ void set parameterKind(ParameterKind parameterKind) { |
+ assert(_unlinkedParam == null); |
+ _parameterKind = parameterKind; |
+ } |
+ |
+ @override |
List<ParameterElement> get parameters => _parameters; |
/** |