* Fix bug ID #31825: because of helpers, almost any expression can have a .

git-svn-id: trunk@36682 -
This commit is contained in:
michael 2017-07-08 14:05:43 +00:00
parent b11a0c4eab
commit d6552989d6
2 changed files with 10 additions and 1 deletions

View File

@ -2074,7 +2074,7 @@ begin
func:=Last; func:=Last;
if Last.Kind<>pekSet then NextToken; if Last.Kind<>pekSet then NextToken;
if not (Last.Kind in [pekIdent,pekSelf,pekNil]) then if not (Last.Kind in [pekNumber,pekString,pekSet,pekIdent,pekSelf,pekNil]) then
exit; exit;
ok:=false; ok:=false;

View File

@ -141,6 +141,7 @@ type
Procedure TestNilCaret; Procedure TestNilCaret;
Procedure TestExpCaret; Procedure TestExpCaret;
Procedure TestArrayAccess; Procedure TestArrayAccess;
Procedure TestHelperOnLiteral;
end; end;
implementation implementation
@ -664,6 +665,14 @@ begin
ParseModule; ParseModule;
end; end;
procedure TTestExpressions.TestHelperOnLiteral;
begin
Source.Add('begin');
Source.Add('writeln(''10''.toint);');
Source.Add('end.');
ParseModule;
end;
procedure TTestExpressions.TestUnaryMinus; procedure TTestExpressions.TestUnaryMinus;
begin begin