Error Gereric.Collection

I'm having an error compiling my webcore project when I use the generics.collection class, specifically in the ExtractPair method, line " Result.Create(Key,Default(TValue));"

Error: [Error] generics.collections.pas(1356): record expected, but class of TObject found

function TDictionary<TKey, TValue>.ExtractPair(const Key: TKey): TMyPair;
var
K : TKey;
begin
Result:=Default(TMyPair);
K:=GetEffectiveKey(Key);
if FMap.Has(K) then
begin
Result.Create(Key,TValue(FMap.get(K)));
FMap.Delete(k);
end
else
Result.Create(Key,Default(TValue));
end;

Do you have a more complete code sample, i.e. something we can first of all compile + reproduce here and secondly, if the problem persists, report this to the pas2js/rtl team.

We are using TMS WEB Core version 2.5.4.0 (Pas2JS Compiler version 2.3.1) and
get the error above, if we define the following type in our project's main unit (interface section or implementation section doesn't matter):

uses
Generics.Collections;

type
TMyDict = class(TObjectDictionary<string, TClass>)
end;

Is a limitation of the TDictionary implemention as done in the RTL of the pas2js transpiler.
We'll inform the pas2js team.