[Pas2js] Array initialization issue with external class
Mattias Gaertner
nc-gaertnma at netcologne.de
Sat Jan 20 17:49:53 CET 2018
On Sat, 20 Jan 2018 07:40:16 -0600 (CST)
warleyalex via Pas2js <pas2js at lists.freepascal.org> wrote:
> The compiler emits raw JS object instead of array.
> -----------------------------------------------
> type
> TBindings = class external name 'Object'
> public
> params: Array of JSValue;
> Constructor new;
> end;
>
> obj := TBindings.new;
> obj.params := [];
> -----------------------------------------------
> it will emit:
>
> var obj = null;
> obj = new Object();
> obj.params = {};
Please create a bug report.
Mattias
More information about the Pas2js
mailing list