[Issue 314] [module] Static, renamed, and selective imports are always public
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Aug 11 12:51:56 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=314
Don <clugdbug at yahoo.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |clugdbug at yahoo.com.au
--- Comment #18 from Don <clugdbug at yahoo.com.au> 2010-08-11 12:48:59 PDT ---
I have tried this patch on the latest D2. I've found two problems with it:
(1) object needs special treatment, it must not default to private.
(2) It completely fails for selective imports.
The first issue is trivial to fix; the main patch in import.c becomes:
void Import::importAll(Scope *sc)
{
if (!mod)
{
load(sc);
mod->importAll(0);
+ /* Default to private importing, except for object.
+ */
+ if (id != Id::object) {
+ protection = sc->protection;
+ if (!sc->explicitProtection)
+ protection = PROTprivate;
+ }
OTOH applying the patch has shown up several bugs in druntime and in the
compiler test suite.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list