mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-22 03:53:27 +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;
|
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;
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user