Subrange types of enums not fully supported
Original Reporter info from Mantis: PascalDragon @PascalDragon
-
Reporter name: Sven Barth
Original Reporter info from Mantis: PascalDragon @PascalDragon
- Reporter name: Sven Barth
Description:
Pascal supports the declaration of subrange types of enum types. These behave just like normal enum types regarding functions like &LtPos;i>Low&LtPos;/i> or &LtPos;i>High&LtPos;/i> or their use in &LtPos;i>case&LtPos;/i>-statements.
Steps to reproduce:
Try to compile the attached example, all the statements related to &LtPos;i>TBorderStyle&LtPos;/i> will fail, while those for &LtPos;i>TRange&LtPos;/i> won't.
FPC 3.2.0 compiles this example without complaints.
Interesting sidenote: The transpiler first complains about the &LtPos;i>case&LtPos;/i>-statement before it complains about the &LtPos;i>Low&LtPos;/i> function a few lines before it.
Mantis conversion info:
- Mantis ID: 37860
- OS: Windows NT
- OS Build: 10
- Build: 887
- Platform: X86_64
- Version: trunk
- Fixed in revision: 47046, 47048, 47049, 47050