* Fix bug ID #31718

git-svn-id: trunk@35966 -
This commit is contained in:
michael 2017-04-27 12:34:17 +00:00
parent b741e38f98
commit fe2df71ef5
2 changed files with 21 additions and 1 deletions

View File

@ -1804,7 +1804,7 @@ begin
ok:=false;
try
if Last.Kind in [pekIdent,pekSelf] then
if Last.Kind in [pekIdent,pekSelf,pekNil] then
begin
while CurToken in [tkDot] do
begin

View File

@ -136,6 +136,8 @@ type
procedure TestTypeCast2;
Procedure TestCreate;
procedure TestChainedPointers;
Procedure TestNilCaret;
Procedure TestExpCaret;
end;
implementation
@ -605,6 +607,24 @@ begin
ParseModule;
end;
procedure TTestExpressions.TestNilCaret;
begin
Source.Add('{$mode objfpc}');
Source.Add('begin');
Source.Add('FillChar(nil^,10,10);');
Source.Add('end.');
ParseModule;
end;
procedure TTestExpressions.TestExpCaret;
begin
Source.Add('{$mode objfpc}');
Source.Add('begin');
Source.Add('A:=B^;');
Source.Add('end.');
ParseModule;
end;
procedure TTestExpressions.TestUnaryMinus;
begin