codetools: test generic function after type

git-svn-id: trunk@60478 -
This commit is contained in:
mattias 2019-02-24 13:58:24 +00:00
parent 801d5e137c
commit bcd365ba77

View File

@ -607,10 +607,18 @@ begin
StartProgram;
Add([
'{$mode objfpc}',
'type',
' TBird = class',
' generic class function Fly<T>(const AValues:array of T):T;',
' end;',
'generic function RandomFrom<T>(const AValues:array of T):T;',
'begin',
' Result:=Avalue[1];',
'end;',
'generic class function TBird.Fly<T>(const AValues:array of T):T;',
'begin',
' Result:=Avalue[1];',
'end;',
'begin',
' i:=RandomFrom<longint>([1,2,3]);',
'end.',