Skip to content

Commit

Permalink
Add TargetKind.typeParameter
Browse files Browse the repository at this point in the history
Fixes #49796

Change-Id: I434c3bba20cbcf26177db4f0dc199bb696ab04de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360122
Reviewed-by: Brian Wilkerson <[email protected]>
Commit-Queue: Samuel Rawlins <[email protected]>
  • Loading branch information
srawlins authored and Commit Queue committed Mar 29, 2024
1 parent d24b5d1 commit a70ee07
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/meta/lib/meta_meta.dart
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class TargetKind {
static const mixinType = TargetKind._('mixins', 'mixinType');

/// Indicates that an annotation is valid on any formal parameter declaration,
/// whether it's in a function, method, constructor, or closure.
/// whether it's in a function (named or anonymous), method, or constructor.
static const parameter = TargetKind._('parameters', 'parameter');

/// Indicates that an annotation is valid on any setter declaration, both
Expand All @@ -99,6 +99,12 @@ class TargetKind {
/// Indicates that an annotation is valid on any typedef declaration.`
static const typedefType = TargetKind._('typedefs', 'typedefType');

/// Indicates that an annotation is valid on any type parameter declaration,
/// whether it's on a class, enum, function type, function, mixin, extension,
/// extension type, or typedef.
static const typeParameter = TargetKind._(
'type parameters (classes, enums, mixins, or typedefs)', 'typeParameter');

/// All current [TargetKind] values of targets to
/// which an annotation can be applied.
static const values = [
Expand All @@ -116,6 +122,7 @@ class TargetKind {
setter,
topLevelVariable,
type,
typeParameter,
typedefType,
];

Expand Down

0 comments on commit a70ee07

Please sign in to comment.