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.)





---- On Tue, 24 Nov 2015 08:31:08 -0500 Sven Barth 
<pascaldra...@googlemail.com>wrote ---- 




Am 24.11.2015 14:26 schrieb "Anthony Walter" <sys...@gmail.com>:

 >

 > Sven, it would seem you cannot currently cannot pass a generic T to 
resolve the type of another generic subroutine.

 >

 > 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)

 >

 > 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?


Yes, please. That's definitely something that should work :)

Regards,

 Sven


_______________________________________________ 

fpc-pascal maillist - fpc-pascal@lists.freepascal.org 

http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal





_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to