mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 22:14:25 +02:00
fcl-passrc: resolver: check arg access
git-svn-id: trunk@43224 -
This commit is contained in:
parent
a832f3615b
commit
d184c527b3
@ -12468,6 +12468,8 @@ begin
|
|||||||
{$IFDEF VerbosePasResolver}
|
{$IFDEF VerbosePasResolver}
|
||||||
writeln('TPasResolver.AddArgument ',GetObjName(El));
|
writeln('TPasResolver.AddArgument ',GetObjName(El));
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
if El.Access in [argDefault,argConst,argVar,argOut] then
|
||||||
|
RaiseNotYetImplemented(20191018235644,El,AccessNames[El.Access]);
|
||||||
CurScope:=TopScope;
|
CurScope:=TopScope;
|
||||||
if (CurScope=nil) then
|
if (CurScope=nil) then
|
||||||
RaiseInvalidScopeForElement(20160922163529,El);
|
RaiseInvalidScopeForElement(20160922163529,El);
|
||||||
|
@ -382,6 +382,7 @@ type
|
|||||||
// procs
|
// procs
|
||||||
Procedure TestProcParam;
|
Procedure TestProcParam;
|
||||||
Procedure TestProcParamAccess;
|
Procedure TestProcParamAccess;
|
||||||
|
Procedure TestProcParamConstRefFail;
|
||||||
Procedure TestFunctionResult;
|
Procedure TestFunctionResult;
|
||||||
Procedure TestProcedureResultFail;
|
Procedure TestProcedureResultFail;
|
||||||
Procedure TestProc_ArgVarPrecisionLossFail;
|
Procedure TestProc_ArgVarPrecisionLossFail;
|
||||||
@ -6102,6 +6103,16 @@ begin
|
|||||||
ParseProgram;
|
ParseProgram;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TTestResolver.TestProcParamConstRefFail;
|
||||||
|
begin
|
||||||
|
StartProgram(false);
|
||||||
|
Add('procedure Run(constref a: word);');
|
||||||
|
Add('begin');
|
||||||
|
Add('end;');
|
||||||
|
Add('begin');
|
||||||
|
CheckResolverException('not yet implemented: a:TPasArgument [20191018235644]',nNotYetImplemented);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TTestResolver.TestFunctionResult;
|
procedure TTestResolver.TestFunctionResult;
|
||||||
begin
|
begin
|
||||||
StartProgram(false);
|
StartProgram(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user