[Issue 17404] creating type named 'object' fails to compile, but only if you import something

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Nov 18 14:34:56 UTC 2022


https://issues.dlang.org/show_bug.cgi?id=17404

RazvanN <razvan.nitu1305 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |razvan.nitu1305 at gmail.com
         Resolution|---                         |WONTFIX

--- Comment #2 from RazvanN <razvan.nitu1305 at gmail.com> ---
This now outputs:

test.d(1): Error: struct `test.object` conflicts with import `test.object` at
test.d

regardless if you have any imports or not.

I think we can close this as WONTFIX, because the compiler automatically
imports object.d (except if you compile with -betterC) so I don't see how the
error message could be improved without adding a measly special case in the
compiler.

--


More information about the Digitalmars-d-bugs mailing list