literal top-level constant

const literal = const _Literal()

Used to annotate a const constructor c. Indicates that any invocation of the constructor must use the keyword const unless one or more of the arguments to the constructor is not a compile-time constant.

Tools, such as the analyzer, can provide feedback if

  • the annotation is associated with anything other than a const constructor, or
  • an invocation of a constructor that has this annotation is not invoked using the const keyword unless one or more of the arguments to the constructor is not a compile-time constant.

Implementation

const _Literal literal = const _Literal()