Generics stumble upon non-sequential enums.
Original Reporter info from Mantis: DonAlfredo @DonAlfredo
-
Reporter name: Alfred
Original Reporter info from Mantis: DonAlfredo @DonAlfredo
- Reporter name: Alfred
Description:
When using a non-sequential enum together with generics, an [compiler] error is generated.
program projectenum;
{$mode delphi}{$H+}
uses
classes,
generics.collections;
type
TMonthType = (January, February, May=10, June, July);
TMonthList = TList<TMonthType>;
var
myList : TMonthList;
begin
end.
Results in:
generics.defaults.pas(1051,43) Error: No type info available for this type
If "=10" is removed, all is well.
Additional information:
See:
https://forum.lazarus.freepascal.org/index.php/topic,53763.msg398264
https://forum.lazarus.freepascal.org/index.php/topic,41736.msg398268.html#msg398268
Mantis conversion info:
- Mantis ID: 38642
- Fixed in version: 3.3.1
- Fixed in revision: 49064 (#ca7c775e)