[Pas2js] Pas2js fails to produce valid code for default constructor expressed with empty parentheses...

Mattias Gaertner nc-gaertnma at netcologne.de
Fri Jul 20 16:16:31 CEST 2018


On Fri, 20 Jul 2018 11:14:59 +0200 (CEST)
Michael Van Canneyt <michael at freepascal.org> wrote:

>[...]
> {$mode objfpc}
> program ta;
> 
> Var
>    a : TObject;
> 
> begin
>    a:=TObject.Create;
> end.
> 
> I tested a version with the () and without, and there is indeed a difference:
> 
> With parenthesis:
> 
>      $mod.a = pas.System.TObject.$create();
> 
> Without parenthesis:
>      $mod.a = pas.System.TObject.$create("Create");
> 
> So there is indeed a bug. Mattias, any idea ?

Thanks for the simplification. Fixed in trunk.

Mattias


More information about the Pas2js mailing list