mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 14:19:28 +02:00
* Fix bug ID #31825: because of helpers, almost any expression can have a .
git-svn-id: trunk@36682 -
This commit is contained in:
parent
b11a0c4eab
commit
d6552989d6
@ -2074,7 +2074,7 @@ begin
|
||||
func:=Last;
|
||||
|
||||
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;
|
||||
|
||||
ok:=false;
|
||||
|
@ -141,6 +141,7 @@ type
|
||||
Procedure TestNilCaret;
|
||||
Procedure TestExpCaret;
|
||||
Procedure TestArrayAccess;
|
||||
Procedure TestHelperOnLiteral;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -664,6 +665,14 @@ begin
|
||||
ParseModule;
|
||||
end;
|
||||
|
||||
procedure TTestExpressions.TestHelperOnLiteral;
|
||||
begin
|
||||
Source.Add('begin');
|
||||
Source.Add('writeln(''10''.toint);');
|
||||
Source.Add('end.');
|
||||
ParseModule;
|
||||
end;
|
||||
|
||||
|
||||
procedure TTestExpressions.TestUnaryMinus;
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user