Set parser error - Accepting dots insted of commas
Original Reporter info from Mantis: dgaspary @dgaspary
-
Reporter name: Daniel Gaspary
Original Reporter info from Mantis: dgaspary @dgaspary
- Reporter name: Daniel Gaspary
Description:
If dots are used between Set items (instead of commas) this will be compiled and only items after the dot will be usable in For .. in loops.
Steps to reproduce:
program Project1;
type
TMyEnum = (me1, me2, me3);
TMyEnumSet = set of TMyEnum;
var
e: TMyEnum;
begin
//Only "me2" will be printed
for e in [me1 . me2] do //It's a dot, not a comma
WriteLn(e);
end.
It works with other combinations, like:
[me1 . me2. me3.] // DOT DOT DOT
[me1 , me2. me3.] // COMMA DOT DOT
Additional information:
Mail list message about the issue:
http://lists.freepascal.org/lists/fpc-pascal/2013-September/039265.html
http://lists.freepascal.org/lists/fpc-pascal/2013-September/039266.html (Sven Barth reply)
Mantis conversion info:
- Mantis ID: 25029
- OS: Linux
- OS Build: Ubuntu 12.10
- Build: 2.7.1 [2013/03/26] for x86_64
- Platform: x86-64
- Version: 2.7.1
- Fixed in version: 3.0.0
- Fixed in revision: 25493 (#93f1ba44)