Hi all
When trying to recompile an old program with the new alpha, I found a new bug: name conflict between an object initializer in a program and an object initializer with same name in the IMPLEMENTATION part of an unit it calls, which should be invisible to him.
The bug is displayed by the two files
---------------------- bug.pas ----------------------------------
program bug;
uses u;
type t = object constructor init; end;
constructor t.init; begin end;
begin writeln('OK'); end.
----------------------- u.pas ----------------------------------
unit u;
INTERFACE
IMPLEMENTATION
type t = object constructor init; end;
constructor t.init; begin end;
end.
-------------------------------------------------------------------
Error message:
c:\djgpp\tmp\cc39phrP.o: In function `T_Init': c:/lombardi/djgpp/gpc/bug7/bug.pas:10: multiple definition of `T_Init' c:/lombardi/djgpp/o/u.o:c:/lombardi/djgpp/gpc/bug7/u.pas:13: first defined here collect2: ld returned 1 exit status
gpc -v Reading specs from c:/djgpp/lib/gcc-lib/djgpp/2.953/specs gpc version 20030209, based on gcc-2.95.3 20010315/djgpp (release)
Maurice
Maurice Lombardi wrote:
When trying to recompile an old program with the new alpha, I found a new bug: name conflict between an object initializer in a program and an object initializer with same name in the IMPLEMENTATION part of an unit it calls, which should be invisible to him.
That's basically a problem of "nonqualified asmnames". It will probably be solved together with qualified identifiers. I don't see any urgency to invent any kludges to circumvent this now since the same problem occurs in other situations.
It's true, it didn't happen previously in this particular situation, but in others, so it's not really a new bug I think ...
Frank