mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-31 17:30:38 +02:00
fcl-passrc: resolver: allow constref
git-svn-id: trunk@43688 -
This commit is contained in:
parent
94f77251e4
commit
200c3b9390
@ -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);
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user