CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER constant

CompileTimeErrorCode const CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER

7.6.3 Constant Constructors: The superinitializer that appears, explicitly or implicitly, in the initializer list of a constant constructor must specify a constant constructor of the superclass of the immediately enclosing class or a compile-time error occurs.

Parameters: 0: the name of the superclass

Implementation

static const CompileTimeErrorCode CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER =
    CompileTimeErrorCode(
        'CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER',
        "Constant constructor can't call non-constant super constructor of "
            "'{0}'.",
        correction: "Try calling a const constructor in the superclass, or "
            "removing the keyword 'const' from the constructor.")