Re: [fpc-pascal] Extraneous generic parameters

2021-03-15 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Mo., 15. März 2021, 20:45: > > > > On Mar 15, 2021, at 12:42 AM, Sven Barth > wrote: > > > > The TArray generic type is part of the ObjPas unit, so the compiler > simply picks that instead of that of your program. ;) > > Sneaky but that explains the issue. >

Re: [fpc-pascal] Extraneous generic parameters

2021-03-15 Thread Ryan Joseph via fpc-pascal
> On Mar 15, 2021, at 12:42 AM, Sven Barth wrote: > > The TArray generic type is part of the ObjPas unit, so the compiler simply > picks that instead of that of your program. ;) Sneaky but that explains the issue. Btw since we're on the topic of arrays. Are short strings and static arrays no

Re: [fpc-pascal] Extraneous generic parameters

2021-03-14 Thread Sven Barth via fpc-pascal
Am 14.03.2021 um 19:10 schrieb Ryan Joseph via fpc-pascal: This program compiles, but is it a bug? I would think the specialization should fail because "S" in TArray is not specified. {$mode objfpc} type generic TArray = array of T; generic procedure DoThis(par

[fpc-pascal] Extraneous generic parameters

2021-03-14 Thread Ryan Joseph via fpc-pascal
This program compiles, but is it a bug? I would think the specialization should fail because "S" in TArray is not specified. {$mode objfpc} type generic TArray = array of T; generic procedure DoThis(param: specialize TArray>); begin end; begin specialize DoThis(