Strange type redifinition error
Benji Smith
dlanguage at benjismith.net
Wed Oct 8 12:12:57 PDT 2008
Denis Koroskin wrote:
> I am getting the following error message on one of my source files
> (D2.019):
>
> Path.d(56): Error: Types.BOOL at Types.d(5) conflicts with
> win32.windef.BOOL at win32\windef.d(60)
>
> win32\windef.d(60) looks like this:
> alias int WINBOOL, BOOL, INT, LONG, HFILE, HRESULT;
>
> Types.d(5) looks like this:
> import win32.windef : BOOL;
>
> Path.d includes lots of files that include both Types.d and
> win32\windef.d through a long inclusion chain.
>
> Why does "import win32.windef : BOOL;" defines new type?
> It is a bug, I guess. Removing ": BOOL;" solves the problem. Shall I put
> it into bugzilla?
This sounds spookily familiar to a bug I logged last month. But I was
using Tango, and it sounds like you're using Phobos. Here's my bug report:
http://www.dsource.org/projects/tango/ticket/1249
This could be one of those cases where the same bits of code were copied
and pasted into both Phobos and Tango, resulting in duplicate bugs. If
you do post a bugzilla report, maybe add a link to the Tango bug. It
might help.
--benji
More information about the Digitalmars-d
mailing list