Error compiling record expected, but procedure ... found

Maybe something is known here without looking at the exact code. My code is really big and difficult to present.

.vscode\extensions\tmssoftware.tmswebcore-2.1.6455\resources\coresource\RTL\generics.collections.pas (1356, 31) Error: record expected, but procedure(JSValue;JSValue;JSValue;JSValue;JSValue;JSValue) of Object found

I actually work with the Delphi IDE. Everything works fine there.
I go to VSC for debugging.
The last 3 days everything was still running fine in the VSC.
Only today I get the error. Can that be due to the version? My colleague is still running 2.1.6424 (?) In any case, the version from May 2023

Best regards
Thomas

I'm not aware of an issue with generics.collections.pas
What code triggers this error?

I don't know it. 200,000 lines of code are compiled. Everything was working fine 5 days ago. I changed a few things.
I only use VSC every few days. Just for debugging. Everything works in the IDE.

Can I reinstall the previous version in the VSC? For me it was automatically updated to 2.1.6455.

The previous version should be in
C:\Users<username>.vscode\extensions\tmssoftware.tmswebcore-

No, unfortunately not.
see image.
VSC also updated on its own without my noticing.

Hello,
In VSC, by default, extensions are updated automatically, you can disable that behavior changing a setting. Please, find here more information:

You can also install an specific (older) version of an extension using the drop down on the extension page:

Ah, ok. I found it.

But unfortunately I still have the same error.
It must have something to do with my changes. Since I rarely call VSC, it's difficult to find the triggering reason since the last call was 1 week ago.

I'll keep looking and will post here when I find the reason. I don't think you can help me any further on this stele.

Maybe one thing. I use an event in javascript that has this call (see error message).
It's a bridge between the javascript events in the "tabulator" and my Delphi program.

procedure TTabulatorEventBridge.CallEvent( TabulatorId, Eventname: String; Tabulator, Value1, Value2, Value3, Value4, Value5: JSValue);
var
   LDic: TDictionary<String,TTabulatorCallEvent>;
   LTabulatorCallEvent: TTabulatorCallEvent;
begin
   LDic := GetDic( TabulatorId);
   if LDic <> nil then
     if LDic.TryGetValue( Eventname, LTabulatorCallEvent) then
       LTabulatorCallEvent( Tabulator, Value1, Value2, Value3, Value4, Value5);
end;
  asm
    var tab = new Tabulator(LId, LTabulatorConfig);
    for (var jo in LEventArr) {
      var ev = LEventArr[jo]; //.event;
      if (ev == $mod.cteTableBuilt)    { tab.on(ev, function()                { B.CallEvent( this.element.id, $mod.cteTableBuilt,    this, 0, 0, 0, 0, 0);});} else
      if (ev == $mod.cteRowClick)      { tab.on(ev, function(e, row)          { B.CallEvent( this.element.id, $mod.cteRowClick,      this, e, row, 0, 0, 0);});} else
      if (ev == $mod.cteColumnMoved)   { tab.on(ev, function(column, columns) { B.CallEvent( this.element.id, $mod.cteColumnMoved,   this, column, columns, 0, 0, 0);});} else
      if (ev == $mod.cteDataSorting)   { tab.on(ev, function(sorters)         { B.CallEvent( this.element.id, $mod.cteDataSorting,   this, sorters, 0, 0, 0, 0);});}
      //if (ev == $mod.cteDataSorted)    { tab.on(ev, function(sorters, rows)   { B.CallEvent( this.element.id, $mod.cteDataSorted,    this, sorters, rows, 0, 0, 0);});}
    }
  end;


If you have any tips, I'd love to read them.

You have this problem in release mode and debug mode or only in release mode?

I have tested only in debug mode.
Today I have a customer appointment and cannot test. I'll try the release mode tomorrow.

I switched back to the current version.
Release mode works, debug mode doesn't.

This is a compile error in debug mode ( not a runtime error when compiled in debug mode)?
I cannot think of why the compiler would cause a compile error in debug mode and not in release mode. I cannot think I ever encountered such issue with the pas2js compiler.

New info:
With my colleague (still uses the "old" version 2.1.6424) everything works in debug mode.
I suspect that some sources have changed for me.

After upgrading to 2.1.6455, he gets the same error. :-(

We found something.
A function was commented out in the given error line in the Delphi IDE system.

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));    // This line makes the error !!
end;

We must have done that a long time ago.

We can't change anything in the VSC, can we?

This code was introduced this way by the pas2js team since it is RTL and was not changed between introduction and now. So, it is unclear how our release could have caused something with TDictionary.