literal top-level constant

Object const literal

Annotation on constructor that must be invoked with const if possible.

Used to annotate a const constructor. 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 Object literal = _Literal();