[Feature] Allow record helper inheritance in Delphi mode
Original Reporter info from Mantis: kluug.net @onpok
-
Reporter name: Ondrej Pokorny
Original Reporter info from Mantis: kluug.net @onpok
- Reporter name: Ondrej Pokorny
Description:
The attached patch adds the NonDelphiExtensions mode switch to support record helper inheritance in Delphi mode.
Discussed here: http://lists.freepascal.org/pipermail/fpc-devel/2017-August/038177.html
Additional information:
I assume the docs have to be fixed as well: https://www.freepascal.org/docs-html/3.0.2/ref/refse62.html
1.) Inheritance of record helpers is only allowed in ObjFPC mode; In Delphi mode, it is allowed only with {$modeswitch NonDelphiExtensions}.
2.) In Delphi mode, it is possible to call the extended record’s method using inherited only with {$modeswitch NonDelphiExtensions}. It is possible to do so in ObjFPC mode. The following code needs ObjFPC mode or NonDelphiExtensions modeswitch to compile:
Mantis conversion info:
- Mantis ID: 32355
- Version: 3.1.1
- Fixed in version: 3.1.1
- Fixed in revision: 37225 (#90bd408d)