Re: [fpc-pascal] Calling undefined function pointers in generics

2022-06-20 Thread Sven Barth via fpc-pascal
Hairy Pixels schrieb am Mo., 20. Juni 2022, 15:12: > > > > On Jun 20, 2022, at 7:12 PM, Sven Barth > wrote: > > > > Please report a bug. > > > > Done. https://gitlab.com/freepascal.org/fpc/source/-/issues/39794. I may > actually try to fix this myself since I may know what the problem is. > > An

Re: [fpc-pascal] Calling undefined function pointers in generics

2022-06-20 Thread Hairy Pixels via fpc-pascal
> On Jun 20, 2022, at 7:12 PM, Sven Barth wrote: > > Please report a bug. > Done. https://gitlab.com/freepascal.org/fpc/source/-/issues/39794. I may actually try to fix this myself since I may know what the problem is. And on that note did you notice I made a PR for your idea of a generic

Re: [fpc-pascal] Calling undefined function pointers in generics

2022-06-20 Thread Sven Barth via fpc-pascal
Hairy Pixels schrieb am Mo., 20. Juni 2022, 03:38: > NOTE: I’m replying to this and CC’ing Sven so hopefully he can see it. > > > On Jun 19, 2022, at 10:05 AM, Hairy Pixels wrote: > > > > This code snippet will give a compiler error "Syntax error, ";" expected > but "(“ found”. It’s an unspecial

Re: [fpc-pascal] Calling undefined function pointers in generics

2022-06-19 Thread Hairy Pixels via fpc-pascal
NOTE: I’m replying to this and CC’ing Sven so hopefully he can see it. > On Jun 19, 2022, at 10:05 AM, Hairy Pixels wrote: > > This code snippet will give a compiler error "Syntax error, ";" expected but > "(“ found”. It’s an unspecialized generic type so I would think it should > compile and

[fpc-pascal] Calling undefined function pointers in generics

2022-06-18 Thread Hairy Pixels via fpc-pascal
This code snippet will give a compiler error "Syntax error, ";" expected but "(“ found”. It’s an unspecialized generic type so I would think it should compile and only attempt to validate the parameters when the function is specialized. generic procedure Perform(func: T); begin func(1); end;