Declaration of nested types does not work correctly for advanced records
Original Reporter info from Mantis: PascalDragon @PascalDragon
-
Reporter name: Sven Barth
Original Reporter info from Mantis: PascalDragon @PascalDragon
- Reporter name: Sven Barth
Description:
In Delphi one may declare any additional type inside a record as long as the record is declared in the interface or implementation section (or the main project source). If the record is defined locally no type declarations are allowed at all.
In FPC one can't currently define classes (I haven't tested others) in "global" records and one can declare types in local records (I don't know whether it should be forbidden completely only because of Delphi compatibility...)
Steps to reproduce:
Two test cases are attached.
Mantis conversion info:
- Mantis ID: 19099
- OS: Win32
- OS Build: NT 6.1 (7)
- Platform: i386
- Version: 2.5.1
- Fixed in version: 2.6.0
- Fixed in revision: 17336 (#f904f416)