String range error with generic constants
Original Reporter info from Mantis: ryan_joseph @genericptr
-
Reporter name: Ryan Joseph
Original Reporter info from Mantis: ryan_joseph @genericptr
- Reporter name: Ryan Joseph
Description:
Using the "string" type with generic constants triggers a range check error. Similar to static arrays the range checking should suppressed until the specialization phase.
Steps to reproduce:
{$mode objfpc}
program test;
type
generic TMyClass<const U: integer> = class
// ERROR: String length must be a value from 1 to 255
type TKey = string[U];
end;
begin
end.
Mantis conversion info:
- Mantis ID: 37650
- Version: 3.3.1
- Fixed in version: 3.3.1
- Fixed in revision: 46766 (#b2177fb5)