Problem wih reference to procedure lazarus / 64-FPC development ---------------------------------------------------------------------- henrique · 2026-03-07 13:39 Hi! I'm trying to compile this source code: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i unit Error; interface {$mode objfpc}{$modeswitch functionreferences} type  TProc = reference to procedure;  generic TProc = reference to procedure (Arg1: T);  generic TProc = reference to procedure (Arg1: T1; Arg2: T2); implementation end.  The compiler give the error: QuoteError.pp(10,22) Error: Duplicate identifier "TProc$1" Error.pp(11,26) Error: Duplicate identifier "TProc$2" Error.pp(15,1) Fatal: There were 2 errors compiling module, stopping It's a problem from compiler or I'm missing some modeswitch? ---------------------------------------------------------------------- PascalDragon · 2026-03-07 22:16 Non-Delphi modes do not yet support type overloads. So if you want to use type overloads you need to use mode Delphi. ---------------------------------------------------------------------- marcov · 2026-03-07 22:28 If I change it to Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i unit Error; interface {$mode objfpc}{$modeswitch functionreferences} type  TProc = reference to procedure;  generic TProc = reference to procedure (Arg1: T);  generic TProcz = reference to procedure (Arg1: T1; Arg2: T2); implementation end. The problem is still the same with todays snapshot Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i pp(10,22) Error: Duplicate identifier "TProc$1" so it is not just overloading? ---------------------------------------------------------------------- Thausand · 2026-03-07 22:54 Quote from: marcov on March 07, 2026, 11:28:55 pmIf I change it to is may be copy-paste error ? (code is same = mode objfpc) ---------------------------------------------------------------------- PascalDragon · 2026-03-07 23:09 Quote from: marcov on March 07, 2026, 11:28:55 pmso it is not just overloading? It is. TProc and TProc are still overloaded. It's not relevant here that one is generic and the other is not, from the compiler's point of view the symbol of TProc is the one that needs to be overloaded. Quote from: Thausand on March 07, 2026, 11:54:18 pmQuote from: marcov on March 07, 2026, 11:28:55 pmIf I change it to is may be copy-paste error ? (code is same = mode objfpc) No, it's no the same, note the TProcz