<div dir="auto"><div><div class="gmail_quote"><div dir="ltr">Gabor Boros <<a href="mailto:mlnglsts@bgss.hu">mlnglsts@bgss.hu</a>> schrieb am Mi., 6. Juni 2018, 08:09:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi All,<br>
<br>
This<br>
<br>
var<br>
x:Integer;<br>
a:array of Integer;<br>
<br>
begin<br>
x:=RandomFrom(a);<br>
<br>
code works with 3.0.4 but cannot compile with trunk and got "Error: <br>
Generics without specialization cannot be used as a type for a <br>
variable". Tried x:=specialize RandomFrom<Integer>(a); but got "Error: <br>
Identifier not found "RandomFrom"". How to call RandomFrom with trunk?<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Seems like a bug due to there being multiple overloads plus the generic. Would you please report that to the bug tracker? </div><div dir="auto">Does it work if you add "overload;" to the generic's declaration in the Math unit? </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>