fcl-passrc: added test local var inits

git-svn-id: trunk@42217 -
This commit is contained in:
Mattias Gaertner 2019-06-13 08:04:18 +00:00
parent a9b015911d
commit a889888f2a

View File

@ -451,6 +451,7 @@ type
Procedure TestProc_TypeCastFunctionResult;
Procedure TestProc_ImplicitCalls;
Procedure TestProc_Absolute;
Procedure TestProc_LocalInit;
// anonymous procs
Procedure TestAnonymousProc_Assign;
@ -7456,6 +7457,25 @@ begin
'begin',
'end;',
'begin']);
ParseProgram;
end;
procedure TTestResolver.TestProc_LocalInit;
begin
StartProgram(false);
Add([
'type TBytes = array of byte;',
'procedure DoIt;',
'const c = 4;',
'var',
' w: word = c;',
' b: byte = 1+c;',
' p: pointer = nil;',
' buf: TBytes = nil;',
'begin',
'end;',
'begin']);
ParseProgram;
end;
procedure TTestResolver.TestAnonymousProc_Assign;