RAD Studio |  |

E2005: Redeclaration of property not allowed in __automated section (C++)
Example
Collapse All

If you declare a property in an __automated section it has be a new declaration. Property hoisting is not allowed.

Example
Copy Code

    struct__declspec(delphiclass) clxbaseclass
    {
    int __fastcall Get(void);
    void __fastcall Set(int);
    int __property ip1 = { read = Get, write = Set };
    };
    structclxderivedclass : clxbaseclass
    {
    int __fastcall NewGetter(void);
    __automated:
    __property ip1;// Error
    int __property ip2 = { read = Get, write = Set }; // OK
    };

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!