Forum: Object-Pascal / Delphi-Language
Delphi
by Kas Ob.,
1. Mär 2024
I see the same behavior for both Records and Classes, but on XE8
type
TMyClass = class
constructor Create; overload;
function CreateEx(Value: string): string; overload;
class function Create(Value: Integer): Integer; overload;
class function CreateEx(Value: Integer): Integer; overload;
Forum: Object-Pascal / Delphi-Language
Delphi
by Kas Ob.,
1. Mär 2024
Hi,
It looks like a compile bug.
I think the compiler had being confused with the exact name Create because it is already being used as constructor, to test this theory, if you change your "class function Create" to "class function CreateEx" it will compile fine, now if you add a constructor with with the name CreateEx then it will report the same error E2382.
So yes, it is a bug.