Cannot call RandomFrom in {$mode objfpc}
Original Reporter info from Mantis: gaborboros @gaborboros-bgss
-
Reporter name: Gabor Boros
Original Reporter info from Mantis: gaborboros @gaborboros-bgss
- Reporter name: Gabor Boros
Description:
This
var
x:Integer;
a:array of Integer;
begin
x:=RandomFrom(a);
code give error
"Generics without specialization cannot be used as a type for a variable"
and this
x:=specialize RandomFrom&LtPos;Integer>(a);
give
"Identifier not found "RandomFrom".
Mantis conversion info:
- Mantis ID: 33829
- Build: 39172
- Version: 3.1.1
- Fixed in version: 3.1.1
- Fixed in revision: 39234 (#c495f10b)