> On Oct 7, 2019, at 5:39 AM, Mattias Gaertner via fpc-pascal 
> <fpc-pascal@lists.freepascal.org> wrote:
> 
> I'm baffled. That's more basic algorithm than I expected. ;)

All contributions are welcome. It sounds like we need make some changes or 
overhaul the entire thing.

> 
> This means you don't support:
> generic procedure Run<S,T>(a: T; b:S); overload;

That’s correct, this breaks the logic entirely. This to me looks like a sneaky 
way to trick the compiler and since it’s trying to infer something from the 
programmer it doesn’t make sense. If you have a better algorithm please post.

> 
> And the following compiles, but fails on run, as T becomes an array
> instead of the element type:
> generic procedure Run<T>(a: array of T); overload;
> 

Good catch, that’s a bug.

var
  a: array of integer;
begin
  Run(a);


Regards,
        Ryan Joseph

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

Reply via email to