E2392 Can't generate required accessor method(s) for property %s.%s due to name conflict with existing symbol %s in the same scope (Delphi)

From RAD Studio
Jump to: navigation, search

Go Up to Error and Warning Messages (Delphi)

The CLR requires that property accessors be methods, not fields. The Delphi language allows you to specify fields as property accessors. The Delphi compiler will generate the necessary methods behind the scenes. CLS recommends a specific naming convention for property accessor methods: get_propname and set_propname. If the accessors for a property are not methods, or if the given methods do not match the CLS name pattern, the Delphi compiler will attempt to generate methods with CLS conforming names. If a method already exists in the class that matches the CLS name pattern, but it is not associated with the particular property, the compiler cannot generate a new property accessor method with the CLS name pattern.

If the given property's accessors are methods, name collisions prevent the compiler from producing a CLS conforming name, but does not prevent the property from being usable.

However, if a name conflict prevents the compiler from generating an accessor method for a field accessor, the property is not usable and you will receive this error.