According to the documentation for “Delphi compatibility” mode, I should be able to write the following code:
type TClassWithNamedConstructor = class public constructor CreateNamed(SomeParam: Integer); end; constructor TClassWithNamedConstructor.CreateNamed(SomeParam: Integer); begin end; procedure UseClassWithNamedConstructor; begin var Instance := TClassWithNamedConstructor.CreateNamed(25); end;
However, here, with version 2527, this does not compile and gives the following error messages:
Severity Code Description Error (E51) Implementation for method "constructor (SomeParam: Integer)" is missing Error (E28) Unknown type "TClassWithNamedConstructor.CreateNamed" Error (E43) No static member "CreateNamed" on type "TClassWithNamedConstructor"
Did I miss something in the compiler options?