[Issue 17404] creating type named 'object' fails to compile, but only if you import something
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed May 17 00:23:54 PDT 2017
https://issues.dlang.org/show_bug.cgi?id=17404
--- Comment #1 from Ketmar Dark <ketmar at ketmar.no-ip.org> ---
this is how the compiler works: when you import *something*, it implicitly
imports module "object.d" (see druntime). this is core module that contains all
the basic things.
the reason D doesn't do it when there are no imports is simple: do allow
compiling object.d itself.
it is really hard to fix this error message without writing a wall of text
explaining what is going on. sure, error message can be better, but it still
should be concise, to not annoy expirienced users. if you can think out
something good, please, make a PR (or just write it here). anything that will
make error messages better is welcome! ;-)
--
More information about the Digitalmars-d-bugs
mailing list