[Pas2js] Testing generics
Mattias Gaertner
nc-gaertnma at netcologne.de
Mon Oct 21 13:08:06 CEST 2019
On Fri, 18 Oct 2019 15:48:33 -0700 (MST)
warleyalex via Pas2js <pas2js at lists.freepascal.org> wrote:
> > // ! pas2js don't support anonymous methods yet
>
> I mean like in this situation:
>
> TArrayHelper.Sort<TIntegerDynArray>(A,
> TComparer<TIntegerDynArray>.Construct(
> function (const Left, Right: TIntegerDynArray): Integer
> begin
> Result := Right[0] - Left[0];
> end));
>
> (...) I've still got Uncaught TypeError: Cannot read property
> '_Release' of null
>
> live preview:
> https://pas2js.github.io/master/tarrayprojectdouble/tarrayprojectdouble.html
> download project:
> https://pas2js.github.io/master/tarrayprojectdouble.rar
I get:
tarrayprojectdouble.lpr(29,13) Error: identifier not found "TCompare"
Can you create a complete example, or even better: a bug report with
an example?
Mattias
More information about the Pas2js
mailing list