fcl-passrc: resolver: allow constref

git-svn-id: trunk@43688 -
This commit is contained in:
Mattias Gaertner 2019-12-15 14:04:05 +00:00
parent 94f77251e4
commit 200c3b9390
2 changed files with 9 additions and 8 deletions

View File

@ -8364,7 +8364,7 @@ procedure TPasResolver.FinishArgument(El: TPasArgument);
var var
IsDelphi: Boolean; IsDelphi: Boolean;
begin begin
if not (El.Access in [argDefault,argConst,argVar,argOut]) then if not (El.Access in [argDefault,argConst,argVar,argOut,argConstRef]) then
RaiseMsg(20191018235644,nNotYetImplemented,sNotYetImplemented,[AccessDescriptions[El.Access]],El); RaiseMsg(20191018235644,nNotYetImplemented,sNotYetImplemented,[AccessDescriptions[El.Access]],El);
if El.ArgType<>nil then if El.ArgType<>nil then
CheckUseAsType(El.ArgType,20190123100049,El); CheckUseAsType(El.ArgType,20190123100049,El);

View File

@ -383,7 +383,7 @@ type
// procs // procs
Procedure TestProcParam; Procedure TestProcParam;
Procedure TestProcParamAccess; Procedure TestProcParamAccess;
Procedure TestProcParamConstRefFail; Procedure TestProcParamConstRef;
Procedure TestFunctionResult; Procedure TestFunctionResult;
Procedure TestProcedureResultFail; Procedure TestProcedureResultFail;
Procedure TestProc_ArgVarPrecisionLossFail; Procedure TestProc_ArgVarPrecisionLossFail;
@ -6129,14 +6129,15 @@ begin
ParseProgram; ParseProgram;
end; end;
procedure TTestResolver.TestProcParamConstRefFail; procedure TTestResolver.TestProcParamConstRef;
begin begin
StartProgram(false); StartProgram(false);
Add('procedure Run(constref a: word);'); Add([
Add('begin'); 'procedure Run(constref a: word);',
Add('end;'); 'begin',
Add('begin'); 'end;',
CheckResolverException('not yet implemented: constref',nNotYetImplemented); 'begin']);
ParseProgram;
end; end;
procedure TTestResolver.TestFunctionResult; procedure TTestResolver.TestFunctionResult;