FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR constant

CompileTimeErrorCode const FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR

7.6.1 Generative Constructors: It is a compile-time error if an initializing formal is used by a function other than a non-redirecting generative constructor.

Implementation

static const CompileTimeErrorCode FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR =
    CompileTimeErrorCode('FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR',
        "Initializing formal parameters can only be used in constructors.",
        correction: "Try using a normal parameter.")