| Index: pkg/analyzer/lib/src/generated/error_verifier.dart
|
| diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart
|
| index fd47d73e36739806367265ac44111d89df3c92ab..8fa08b58b9f410bd0f509cbad4423d6bf715b236 100644
|
| --- a/pkg/analyzer/lib/src/generated/error_verifier.dart
|
| +++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
|
| @@ -4252,10 +4252,16 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> {
|
| String paramName = param.name;
|
| if (!_containsNamedExpression(argumentList, paramName)) {
|
| DartObject constantValue = annotation.constantValue;
|
| - String reason =
|
| - constantValue.getField('reason')?.toStringValue() ?? '';
|
| - _errorReporter.reportErrorForNode(
|
| - HintCode.MISSING_REQUIRED_PARAM, node, [paramName, reason]);
|
| + String reason = constantValue.getField('reason')?.toStringValue();
|
| + if (reason != null) {
|
| + _errorReporter.reportErrorForNode(
|
| + HintCode.MISSING_REQUIRED_PARAM_WITH_DETAILS,
|
| + node,
|
| + [paramName, reason]);
|
| + } else {
|
| + _errorReporter.reportErrorForNode(
|
| + HintCode.MISSING_REQUIRED_PARAM, node, [paramName]);
|
| + }
|
| }
|
| }
|
| }
|
|
|