[fpc-pascal] How to avoid namespace name clashes after USES ?
pascaldragon at googlemail.com
Wed Aug 22 10:30:24 CEST 2012
Am 21.08.2012 21:42, schrieb Jorge Aldo G. de F. Junior:
> Instead of implementing the half-assed C++ namespace model, just add
> to the compiler a warning when it detects that there is a collision in
> the current scope (two functions with the same parameters from
> different units that can be called from the scope being inspected). I
> believe function overload alread provides the necessary hooks, but i
> cant do it because i have zero experience with FPC sources...
The compiler can not detect such collisions, because it stops searching
for a symbol if it found a suitable one. This also explains why you need
the "overload" directives in certain cases of cross unit overloading
(because then the compiler will search for more). This is one of the
reasons why the compiler can compile code so fast: It does not need to
check all loaded units of a unit (and there are units that contain many
So from me this gets a definit -1 in big letters.
More information about the fpc-pascal