JCF & generic procedure
Original Reporter info from Mantis: delfion
-
Reporter name:
Original Reporter info from Mantis: delfion
- Reporter name:
Description:
JCF fails to format stand alone generic procedure. Patch attached.
program Project1;
{$mode objfpc}
generic procedure Test<T>(A: array of T); //this
begin
end;
var
IA: array of integer;
begin
IA := [1, 2, 3];
specialize Test<integer>(IA);
end.
Additional information:
Patch
Index: components/jcf2/Parse/BuildParseTree.pas
===================================================================
--- components/jcf2/Parse/BuildParseTree.pas (revision 64105)
+++ components/jcf2/Parse/BuildParseTree.pas (working copy)
@@ -889,7 +889,7 @@
PushNode(nBlock);
// [DeclSection]
- if lt in (Declarations + ProcedureWords) then
+ if lt in ([ttGeneric] + Declarations + ProcedureWords) then
RecogniseDeclSections;
lc := fcTokenList.FirstSolidToken;
Mantis conversion info:
- Mantis ID: 38041
- Fixed in revision: r64108 (#e1b80773)
- Monitored by: » @OkobaPatino (OkobaPatino)