[Pas2js] += notation in pas2js 1.5.1

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Jul 25 08:08:56 CEST 2019


On 25.07.19 01:00, warleyalex via Pas2js wrote:
> I've got an fatal error when compiling the function Add (Error: Identifier
> expected) using the compiler
> Pas2JS Compiler version 1.5.1 [2019/07/24] for Win32 i386
>
> The pas2js 1.4.10 it compiles as expected.
>
> ----------
> {$modeswitch AdvancedRecords}
> type
>    TPoint = record
>      x,y: word;
>      function Add(const apt: TPoint): TPoint;
>    end;
>
> implementation
>
> function TPoint.Add(const apt: TPoint): TPoint;
> begin
>    Result:=Self;
>    Result.x+=apt.x;   //------>>>>  this error occurr in pas2js 1.5.1
>    Result.y:=Result.y+apt.y;
>    Self:=apt;
>   end;
> ----------
>
> Project: Executing command before: Exit code 6, Errors: 1
> unit2.pas(173,12) Error: Identifier expected

Please create a bug report.


Mattias




More information about the Pas2js mailing list