Nikos 0 Posted May 22 Hi, TLine = class(TObjectList) ... procedure Add(const X: Real); overload; procedure Add(const n: Integer); overload; ... end; In Delphi 12 (Update 1), after the change of TList.Count to NativeInt from Integer, calling the Add procedure like this NewLine.Add(NewLine.Count - 1) calls the Real overloaded procedure in 64bit Delphi, and the Integer one in 32bit Delphi. Am I doing something ambiguous, is it a Delphi compiler inconsistency or a bug? Thanks! Share this post Link to post
Dalija Prasnikar 1396 Posted May 22 NativeInt is 64-bit on Win64 so Integer overload is not appropriate (too small) there. If you want to force it to Integer overload you will have to typecast Integer(NewLine.Count - 1) Share this post Link to post
Lars Fosdal 1792 Posted May 22 ... or change the type in the method: Add(const n: NativeInt); Share this post Link to post
Nikos 0 Posted May 22 You're right, I should have paid more attention when migrating to Delphi 12 🙂 Share this post Link to post