Re: [fpc-pascal] Constants in generics

2018-11-26 Thread denisgolovan
> Here’s my test which seems to be working. > > program gc_procs; > > generic procedure DoThis(msg:string = U); > begin > writeln(msg, ' ',sizeof(T), ' ', U); > end; > > begin > specialize DoThis('hello world’); // prints "hello world 4 foo" > specialize DoThis; // prints “foo 4 foo" > end. Th

Re: [fpc-pascal] Constants in generics

2018-11-26 Thread denisgolovan
Hi Sorry for breaking in, but I'd like to know if this functionality supports specializing generic functions with const parameters? BR, Denis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listin

Re: [fpc-pascal] Constants in generics

2018-11-26 Thread Ryan Joseph
> On Nov 27, 2018, at 4:59 AM, Sven Barth via fpc-pascal > wrote: > > Best check again once you've done the switch to tconstsym for constants. :) > I made most of the changes you mentioned so please look. Including the constsyms didn’t break anything and helped to clean up the code. I woul

Re: [fpc-pascal] Building trunk

2018-11-26 Thread - -
An additional note - it may well be a ld version issue. On Ubuntu the ld version is 2.30, but on Fedora ld reports 2.31.1-13.fc29. (Maybe I should have held off upgrading to Fedora 29...) Colin ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.or

Re: [fpc-pascal] Constants in generics

2018-11-26 Thread Sven Barth via fpc-pascal
Am Mo., 26. Nov. 2018, 15:47 hat Ryan Joseph geschrieben: > > > > On Nov 26, 2018, at 8:18 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > You don't need to manually check for U. The parser will find U in the > symbol table of the TMyClass generic and then a list

Re: [fpc-pascal] Constants in generics

2018-11-26 Thread Ryan Joseph
> On Nov 26, 2018, at 8:18 PM, Sven Barth via fpc-pascal > wrote: > > You don't need to manually check for U. The parser will find U in the symbol > table of the TMyClass generic and then a list containing the parameters will > be generated and passed to parse_generic_specialization_type_int

Re: [fpc-pascal] Constants in generics

2018-11-26 Thread Sven Barth via fpc-pascal
Am Mo., 26. Nov. 2018, 12:14 hat Ryan Joseph geschrieben: > > > > On Nov 26, 2018, at 5:16 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > Am Mo., 26. Nov. 2018, 10:46 hat Ryan Joseph > geschrieben: > > > > > > > On Nov 26, 2018, at 12:09 AM, Sven Barth via fpc-

Re: [fpc-pascal] Constants in generics

2018-11-26 Thread Ryan Joseph
> On Nov 26, 2018, at 5:16 PM, Sven Barth via fpc-pascal > wrote: > > Am Mo., 26. Nov. 2018, 10:46 hat Ryan Joseph > geschrieben: > > > > On Nov 26, 2018, at 12:09 AM, Sven Barth via fpc-pascal > > wrote: > > > > - your pretty name is wrong; the pretty name for a specialization with >

Re: [fpc-pascal] Constants in generics

2018-11-26 Thread Sven Barth via fpc-pascal
Am Mo., 26. Nov. 2018, 10:46 hat Ryan Joseph geschrieben: > > > > On Nov 26, 2018, at 12:09 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > - your pretty name is wrong; the pretty name for a specialization with > constants should be "TSomeGeneric", not > "TSomeGe

Re: [fpc-pascal] Constants in generics

2018-11-26 Thread Ryan Joseph
> On Nov 26, 2018, at 12:09 AM, Sven Barth via fpc-pascal > wrote: > > - your pretty name is wrong; the pretty name for a specialization with > constants should be "TSomeGeneric", not > "TSomeGeneric" as it would be now I’ll change the # prefix for const params but the unit prefix was not a