![]() |
Verständins Compiler error : Identical function names
mein Code sieht vereinfacht so aus:
Delphi-Quellcode:
Unit A;
.... function saveasCSV ( aClass : TClassA; filename : String); overload; function saveasCSV ( aClass : TClassB; filename : String); overload; function saveasCSV ( aClass : TClassC; filename : String); overload; implementation .... end; in einer weiteren Unit:
Delphi-Quellcode:
Unit OtherClass ;
TOtherCLass = class function dothis; function dothat; function saveasCSV ( filename : String); end;
Delphi-Quellcode:
unit ProblemCode; uses OtherClass, A, ....; var MyClass : TClassA if (...) then saveasCSV ( MyClass , filename) ; [dcc64 Error] Unit_demo.pas(696): E2010 Incompatible types: '...' and '....' Warum will denn der Compiler die Funktion aus meiner otherclass unit verwenden und nicht die in einer unit frei global definierte Funktion? |
AW: Verständins Compiler error : Identical function names
Bist du sicher, dass du weder in einer abgeleiteten Klasse von TOtherCLass bist noch innerhalb eines with-Blocks?
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 06:06 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz