CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY constant

CompileTimeErrorCode const CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY

5 Variables: A constant variable must be initialized to a compile-time constant or a compile-time error occurs.

12.1 Constants: A qualified reference to a static constant variable that is not qualified by a deferred prefix.

Implementation

CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY =
CompileTimeErrorCode(
    'CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY',
    "Constant values from a deferred library can't be used to "
        "initialized a const variable.",
    correction:
        "Try initializing the variable without referencing members of "
        "the deferred library, or changing the import to not be "
        "deferred.")