CONFLICTING_METHOD_AND_FIELD constant

CompileTimeErrorCode const CONFLICTING_METHOD_AND_FIELD

10.11 Class Member Conflicts: Let C be a class. It is a compile-time error if C declares a method named n, and has a getter or a setter with basename n.

Parameters: 0: the name of the class defining the conflicting method 1: the name of the conflicting method 2: the name of the class defining the field with which the method conflicts

Implementation

static const CompileTimeErrorCode CONFLICTING_METHOD_AND_FIELD =
    CompileTimeErrorCode(
        'CONFLICTING_METHOD_AND_FIELD',
        "Class '{0}' can't define method '{1}' and have field '{2}.{1}' "
            "with the same name.",
        correction: "Try converting the method to a getter, or "
            "renaming the method to a name that doesn't conflict.")