Skip to content

Commit a3e6537

Browse files
stereotype441Commit Queue
authored andcommitted
[analyzer] Use analyzer type names in generated parameter documentation.
This change adjusts the code generation for analyzer diagnostic messages so that parameter type descriptions use the analyzer type name rather than the generic type name used in `messages.yaml`. The only difference today is that where `messages.yaml` uses `Type`, the analyzer uses `DartType`. Change-Id: I6a6a6964d402bc93e2bf08c66f80aa5bc3af7f1e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/445802 Reviewed-by: Konstantin Shcheglov <[email protected]> Commit-Queue: Paul Berry <[email protected]>
1 parent 0de52e8 commit a3e6537

File tree

3 files changed

+162
-126
lines changed

3 files changed

+162
-126
lines changed

pkg/analyzer/lib/src/dart/error/ffi_code.g.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ class FfiCode extends DiagnosticCode {
281281
);
282282

283283
/// Parameters:
284-
/// Type p0: the type that is missing a native type annotation
284+
/// DartType p0: the type that is missing a native type annotation
285285
/// String p1: the superclass which is extended by this field's class
286286
static const FfiCode missingAnnotationOnStructField = FfiCode(
287287
'MISSING_ANNOTATION_ON_STRUCT_FIELD',
@@ -335,8 +335,8 @@ class FfiCode extends DiagnosticCode {
335335
);
336336

337337
/// Parameters:
338-
/// Type p0: the type that should be a subtype
339-
/// Type p1: the supertype that the subtype is compared to
338+
/// DartType p0: the type that should be a subtype
339+
/// DartType p1: the supertype that the subtype is compared to
340340
/// String p2: the name of the function whose invocation depends on this
341341
/// relationship
342342
static const FfiCode mustBeASubtype = FfiCode(
@@ -347,7 +347,7 @@ class FfiCode extends DiagnosticCode {
347347
);
348348

349349
/// Parameters:
350-
/// Type p0: the return type that should be 'void'.
350+
/// DartType p0: the return type that should be 'void'.
351351
static const FfiCode mustReturnVoid = FfiCode(
352352
'MUST_RETURN_VOID',
353353
"The return type of the function passed to 'NativeCallable.listener' must "
@@ -357,7 +357,7 @@ class FfiCode extends DiagnosticCode {
357357
);
358358

359359
/// Parameters:
360-
/// Type p0: The invalid type.
360+
/// DartType p0: The invalid type.
361361
static const FfiCode nativeFieldInvalidType = FfiCode(
362362
'NATIVE_FIELD_INVALID_TYPE',
363363
"'{0}' is an unsupported type for native fields. Native fields only "
@@ -418,7 +418,7 @@ class FfiCode extends DiagnosticCode {
418418
);
419419

420420
/// Parameters:
421-
/// Type p0: the type that should be a valid dart:ffi native type.
421+
/// DartType p0: the type that should be a valid dart:ffi native type.
422422
static const FfiCode nonNativeFunctionTypeArgumentToPointer = FfiCode(
423423
'NON_NATIVE_FUNCTION_TYPE_ARGUMENT_TO_POINTER',
424424
"Can't invoke 'asFunction' because the function signature '{0}' for the "
@@ -439,7 +439,7 @@ class FfiCode extends DiagnosticCode {
439439

440440
/// Parameters:
441441
/// String p0: the name of the field
442-
/// Type p1: the type of the field
442+
/// DartType p1: the type of the field
443443
static const FfiCode nonSizedTypeArgument = FfiCode(
444444
'NON_SIZED_TYPE_ARGUMENT',
445445
"The type '{1}' isn't a valid type argument for '{0}'. The type argument "

0 commit comments

Comments
 (0)