Skip to content

Commit

Permalink
Add a new annotation
Browse files Browse the repository at this point in the history
R=pquitslund@google.com

Review URL: https://codereview.chromium.org/2420653002 .
  • Loading branch information
bwilkerson committed Nov 9, 2016
1 parent da81562 commit 37890f9
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion pkg/meta/lib/meta.dart
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,21 @@ const _Protected protected = const _Protected();
/// corresponding to a named parameter that has this annotation.
const Required required = const Required();

/// Used to annotate a field is allowed to be overridden in Strong Mode.
/// Used to annotate a field that is allowed to be overridden in Strong Mode.
const _Virtual virtual = const _Virtual();

/// Used to annotate an instance member that was made public so that it could be
/// overridden but that is not intended to be referenced from outside the
/// defining library.
///
/// Tools, such as the analyzer, can provide feedback if
///
/// * the annotation is associated with a declaration other than a public
/// instance member in a class, or
/// * the member is referenced outside of the defining library.
const _VisibleForOverriding visibleForOverriding =
const _VisibleForOverriding();

/// Used to annotate a declaration was made public, so that it is more visible
/// than otherwise necessary, to make code testable.
///
Expand Down Expand Up @@ -190,6 +202,10 @@ class _Virtual {
const _Virtual();
}

class _VisibleForOverriding {
const _VisibleForOverriding();
}

class _VisibleForTesting {
const _VisibleForTesting();
}

0 comments on commit 37890f9

Please sign in to comment.