Index: pkg/analyzer/lib/src/generated/resolver.dart |
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart |
index 206e451306255e2b3a8eb18a751b906f50832f06..a921af01ddff44fc190ee24022727c2be7c9c4f3 100644 |
--- a/pkg/analyzer/lib/src/generated/resolver.dart |
+++ b/pkg/analyzer/lib/src/generated/resolver.dart |
@@ -1027,24 +1027,6 @@ class BestPracticesVerifier extends RecursiveAstVisitor<Object> { |
} |
} |
- void _checkRequiredParameter(FormalParameterList node) { |
- final requiredParameters = |
- node.parameters.where((p) => p.element?.isRequired == true); |
- final nonNamedParamsWithRequired = |
- requiredParameters.where((p) => p.kind != ParameterKind.NAMED); |
- final namedParamsWithRequiredAndDefault = requiredParameters |
- .where((p) => p.kind == ParameterKind.NAMED) |
- .where((p) => p.element.defaultValueCode != null); |
- final paramsToHint = [ |
- nonNamedParamsWithRequired, |
- namedParamsWithRequiredAndDefault |
- ].expand((e) => e); |
- for (final param in paramsToHint) { |
- _errorReporter.reportErrorForNode( |
- HintCode.INVALID_REQUIRED_PARAM, param, [param.identifier.name]); |
- } |
- } |
- |
/** |
* Produce a hint if the given [condition] could have a value of `null`. |
*/ |
@@ -1217,6 +1199,24 @@ class BestPracticesVerifier extends RecursiveAstVisitor<Object> { |
} |
} |
+ void _checkRequiredParameter(FormalParameterList node) { |
+ final requiredParameters = |
+ node.parameters.where((p) => p.element?.isRequired == true); |
+ final nonNamedParamsWithRequired = |
+ requiredParameters.where((p) => p.kind != ParameterKind.NAMED); |
+ final namedParamsWithRequiredAndDefault = requiredParameters |
+ .where((p) => p.kind == ParameterKind.NAMED) |
+ .where((p) => p.element.defaultValueCode != null); |
+ final paramsToHint = [ |
+ nonNamedParamsWithRequired, |
+ namedParamsWithRequiredAndDefault |
+ ].expand((e) => e); |
+ for (final param in paramsToHint) { |
+ _errorReporter.reportErrorForNode( |
+ HintCode.INVALID_REQUIRED_PARAM, param, [param.identifier.name]); |
+ } |
+ } |
+ |
/** |
* Check for the passed class declaration for the |
* [HintCode.OVERRIDE_EQUALS_BUT_NOT_HASH_CODE] hint code. |