On 25/11/2025 23:01, Martin Frb via fpc-devel wrote:
On 25/11/2025 22:02, Martin Frb via fpc-devel wrote:
On 25/11/2025 20:41, Martin Frb via fpc-devel wrote:
According to
https://forum.lazarus.freepascal.org/index.php/topic,52157.msg383991.html#msg383991

2) Constraints in a "forward" declaration in the implementation (or a program?) must be kept.

Actually, that does not seem to be true either...

Sorry, the evening seems to have been to long....

I misread the post.
- "const constraints" (value param) must be repeated on forward, and forward only.
- All others must always be stripped.


Then again, below does not compile

program Project1;{$Mode objfpc}
generic procedure Foo<const A: integer;B: TObject;C>(p1: B); forward;

generic procedure Foo<const A: integer; B; C>(p1: B);
begin {} end;

begin
end.

_______________________________________________
fpc-devel maillist  -  [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to