inter-unit function overloading
Original Reporter info from Mantis: post@abnuto.de
-
Reporter name: Jan Bruns
Original Reporter info from Mantis: post@abnuto.de
- Reporter name: Jan Bruns
Description:
This is not really a bug, but merely a feature request and/or documentation bug.
When overloading a function already defined in an previously included/used unit, only the find their way into "root" namespace.
This is no real problem, because the overoaded function is still in it's module's namespace, but itÄs a bit annoying if you overload a system-function like "length" (I have such a function in context with vectors in one of my optional D3D-helper units).
The REF-section of the docs say that inter-unit ovrloading should be fully working.
Here's an example:
UNIT test_ovl;
INTERFACE
FUNCTION length(a : longint) : longint;
IMPLEMENTATION
FUNCTION length(a : longint) : longint;
BEGIN
length := a;
END;
BEGIN
END.
////////////////////
PROGRAM test_test_ovl;
uses test_ovl;
BEGIN
writeln(length(17));
writeln(length('Hallo')); // error: longint expected
END.
Mantis conversion info:
- Mantis ID: 8399