Undefined identifier error with enum in the separate module
Philippe Sigaud
philippe.sigaud at gmail.com
Sun Feb 2 00:34:49 PST 2014
Bearophile:
> I have seen other people hit this problem (like problems caused by having a
> "set.d" module containing a "Set" struct plus a "set" helper function).
>
> Is this worth warning against (with a dmd warning/error)?
I'd prefer an error, with the same kind of nice message you get when
you forget to import std.stdio.
Ideally, the error should be caught as soon as the module is compiled,
like shadowing errors (which it is, in a way).
"module foo contains a member named foo. Module members cannot shadow
module names."
More information about the Digitalmars-d-learn
mailing list