mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-03 10:16:22 +02:00
Codetools: parse specialization as function result (in function type def) Issue #38970
This commit is contained in:
parent
7172fd48e9
commit
f0901a9512
@ -4965,8 +4965,13 @@ begin
|
||||
if IsFunction then begin
|
||||
if (CurPos.Flag=cafColon) then begin
|
||||
ReadNextAtom;
|
||||
AtomIsIdentifierSaveE(20180411194218);
|
||||
ReadNextAtom;
|
||||
if UpAtomIs('SPECIALIZE') then begin
|
||||
ReadSpecialize(true);
|
||||
end
|
||||
else begin
|
||||
AtomIsIdentifierSaveE(20180411194218);
|
||||
ReadNextAtom;
|
||||
end;
|
||||
if CurPos.Flag=cafPoint then begin
|
||||
ReadNextAtom;
|
||||
AtomIsIdentifierSaveE(20180411194221);
|
||||
|
26
components/codetools/tests/laztests/bug38970.pas
Normal file
26
components/codetools/tests/laztests/bug38970.pas
Normal file
@ -0,0 +1,26 @@
|
||||
program bug38970;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
{$modeswitch nestedprocvars}
|
||||
|
||||
uses
|
||||
{$IFDEF UNIX}
|
||||
cthreads,
|
||||
{$ENDIF}
|
||||
Classes
|
||||
{ you can add units after this };
|
||||
|
||||
type
|
||||
generic TOption<T> = record
|
||||
end;
|
||||
|
||||
generic TIterNestedFunc<T> = function (): specialize TOption{declaration:TOption}<T> is nested;
|
||||
|
||||
procedure Test;
|
||||
begin
|
||||
end;
|
||||
|
||||
begin
|
||||
end.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user