<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style='font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif;'><div>But first fix the code so the test is correct. (The Min function is exactly the same as the Max function. Min should have A < B, not A > B.)<br></div><div><br></div><div class="zmail_extra"><div id="1"><div><br></div><div>---- On Tue, 24 Nov 2015 08:31:08 -0500 <b>Sven Barth <pascaldragon@googlemail.com></b>wrote ---- <br></div></div><div><br></div><blockquote style="border-left: 1px solid #cccccc; padding-left: 6px; margin:0 0 0 5px"><p><div>Am 24.11.2015 14:26 schrieb "Anthony Walter" <<a href="mailto:sysrpl@gmail.com" target="_blank">sysrpl@gmail.com</a>>:<br></div><div>
><br></div><div>
> Sven, it would seem you cannot currently cannot pass a generic T to resolve the type of another generic subroutine.<br></div><div>
><br></div><div>
> In this example, Test<T> cannot reuse T in its call to Min<T>. I believe this line should be legal "Value := Min<T>(A, B);" (see the code below for context)<br></div><div>
><br></div><div>
> Currently when you try to compile the unit GenericTest you'll receive a compiler error on line marked below. Would you like me to enter this into issue into mantis?<br></div></p><p>Yes, please. That's definitely something that should work :)<br></p><p><div>Regards,<br></div><div>
Sven<br></div></p><div>_______________________________________________
<br></div><div>fpc-pascal maillist - <a href="mailto:fpc-pascal@lists.freepascal.org" target="_blank">fpc-pascal@lists.freepascal.org</a>
<br></div><div><a href="http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal" target="_blank">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal</a><br></div></blockquote></div><div><br></div></div></body></html>