Add a new annotation

R=pquitslund@google.com

Review URL: https://codereview.chromium.org/2420653002 .
This commit is contained in:
Brian Wilkerson 2016-11-09 14:19:27 -08:00
parent da81562dc8
commit 37890f995f

View file

@ -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.
///
@ -190,6 +202,10 @@ class _Virtual {
const _Virtual();
}
class _VisibleForOverriding {
const _VisibleForOverriding();
}
class _VisibleForTesting {
const _VisibleForTesting();
}