UPDATE: Looking at the test, PROCEDURE Generics may not have been implemented/tested. Function Generics are working as expected!
Procedures with generics do not compile in blaise.
{$MODE DELPHI}
program gp;
procedure genericProc<T>(a, b : T);
begin
writeln(a, ' ', b);
end;
begin
genericProc<Integer>(10, 11);
end.
$ ./blaise --source gp.pas --output gp
Parse error: Bare reference to 'genericProc' requires () for a call at line 11 col 5 in gp.pas
FPC Output :
$ fpc gp.pas
Free Pascal Compiler version 3.2.2+dfsg-32 [2024/01/05] for x86_64
Copyright (c) 1993-2021 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling gp.pas
Linking gp
13 lines compiled, 0.0 sec
$ ./gp
10 11
FYI : This does work in blaise and FPC , because it is a generic function :
{$MODE DELPHI}
program gp;
//procedure genericProc<T>(a, b : T);
function genericProc<T>(a,b : T) : T;
begin
writeln(a, ' ', b);
result := a+b;
end;
begin
writeln(genericProc<Integer>(10, 11));
end.
UPDATE: Looking at the test, PROCEDURE Generics may not have been implemented/tested. Function Generics are working as expected!
Procedures with generics do not compile in blaise.
FPC Output :
FYI : This does work in blaise and FPC , because it is a generic function :