CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS constant

CompileTimeErrorCode const CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS

12.8 Maps: It is a compile-time error if the key of an entry in a constant map literal is an instance of a class that implements the operator == unless the key is a string or integer.

Parameters: 0: the type of the entry's key

Implementation

CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS = CompileTimeErrorCode(
    'CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS',
    "The constant map entry key expression type '{0}' can't override "
        "the == operator.",
    correction: "Try using a different value for the key, or "
        "removing the keyword 'const' from the map.")