mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 08:09:33 +02:00
fcl-passrc: added test local var inits
git-svn-id: trunk@42217 -
This commit is contained in:
parent
a9b015911d
commit
a889888f2a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user