nonVirtual top-level constant

Object const nonVirtual

Annotation on instance member that must not be overridden.

Used to annotate an instance member (method, getter, setter, operator, or field) in a class or mixin declaration. Indicates that the member must not be overridden in any subclass that extends the class or mixes in the mixin.

Tools, such as the analyzer, can provide feedback if

  • the annotation is associated with anything other than an instance member,
  • the annotation is associated with an abstract member (because subclasses would be required to override the member),
  • the annotation is associated with an extension method,
  • the annotation is associated with a member m in class or mixin C, and there is a class D that extends or mixes in C, that declares an overriding member m.

Implementation

const Object nonVirtual = _NonVirtual();