View mode: basic / threaded / horizontal-split · Log in · Help
August 20, 2009
[Issue 314] Static, renamed, and selective imports are always public
http://d.puremagic.com/issues/show_bug.cgi?id=314


Stewart Gordon <smjg@iname.com> changed:

          What    |Removed                     |Added
----------------------------------------------------------------------------
                CC|                            |smjg@iname.com




--- Comment #10 from Stewart Gordon <smjg@iname.com>  2009-08-20 11:57:14 PDT ---
(In reply to comment #7)
> Access protection is defined to happen after lookup and overload resolution.

Defined where in the spec?

> Making private symbols invisible defeats this,

Would it be reasonable to change it as I described in the final paragraph of
issue 3254 comment 3?

> and also doesn't work as the
> overload list is a linked list, and making the head of it private would hide
> the rest of the possibly public overloads.

That's obviously an implementation issue.  Possible ways to deal with this:

(a) have multiple linked lists, one for each protection attribute
(b) build the linked list in such a way that the head element will always be
one of the ones of the most public access level that exists among the overloads

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
August 31, 2009
[Issue 314] Static, renamed, and selective imports are always public
http://d.puremagic.com/issues/show_bug.cgi?id=314


Matti Niemenmaa <matti.niemenmaa+dbugzilla@iki.fi> changed:

          What    |Removed                     |Added
----------------------------------------------------------------------------
                CC|                            |2korden@gmail.com




--- Comment #11 from Matti Niemenmaa <matti.niemenmaa+dbugzilla@iki.fi>  2009-08-31 11:56:41 PDT ---
*** Issue 3275 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 07, 2010
[Issue 314] [module] Static, renamed, and selective imports are always public
http://d.puremagic.com/issues/show_bug.cgi?id=314


nfxjfg@gmail.com changed:

          What    |Removed                     |Added
----------------------------------------------------------------------------
                CC|                            |nfxjfg@gmail.com


--- Comment #12 from nfxjfg@gmail.com 2010-05-07 02:14:37 PDT ---
Whenever I compile some code in ldc, that has been developed with dmd, I get
compilation errors related to this bug. That's because ldc (at least partially)
fixed it. As far as I can tell, ldc never rejected actually valid code related
to this bug.

It's a bit ridiculous. What keeps back the patches going into dmd?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 07, 2010
[Issue 314] [module] Static, renamed, and selective imports are always public
http://d.puremagic.com/issues/show_bug.cgi?id=314


Tomas Lindquist Olsen <tomas@famolsen.dk> changed:

          What    |Removed                     |Added
----------------------------------------------------------------------------
                CC|                            |tomas@famolsen.dk


--- Comment #13 from Tomas Lindquist Olsen <tomas@famolsen.dk> 2010-05-07 02:42:38 PDT ---
stubbornness ?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 26, 2010
[Issue 314] [module] Static, renamed, and selective imports are always public
http://d.puremagic.com/issues/show_bug.cgi?id=314


Trass3r <mrmocool@gmx.de> changed:

          What    |Removed                     |Added
----------------------------------------------------------------------------
                CC|                            |mrmocool@gmx.de


--- Comment #14 from Trass3r <mrmocool@gmx.de> 2010-05-26 15:10:04 PDT ---
when will this be fixed?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 26, 2010
[Issue 314] [module] Static, renamed, and selective imports are always public
http://d.puremagic.com/issues/show_bug.cgi?id=314



--- Comment #15 from Leandro Lucarella <llucax@gmail.com> 2010-05-26 15:19:42 PDT ---
In D4, maybe =P

Don't be impatient, is just number 1 in votes!

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 26, 2010
[Issue 314] [module] Static, renamed, and selective imports are always public
http://d.puremagic.com/issues/show_bug.cgi?id=314



--- Comment #16 from Trass3r <mrmocool@gmx.de> 2010-05-26 15:42:36 PDT ---
Well that's the point.
- 32 votes!
- present since v0.165!
- patch is available that seems to work for ldc

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 27, 2010
[Issue 314] [module] Static, renamed, and selective imports are always public
http://d.puremagic.com/issues/show_bug.cgi?id=314



--- Comment #17 from Leandro Lucarella <llucax@gmail.com> 2010-05-26 19:01:01 PDT ---
I was being sarcastic =)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
August 11, 2010
[Issue 314] [module] Static, renamed, and selective imports are always public
http://d.puremagic.com/issues/show_bug.cgi?id=314


Don <clugdbug@yahoo.com.au> changed:

          What    |Removed                     |Added
----------------------------------------------------------------------------
                CC|                            |clugdbug@yahoo.com.au


--- Comment #18 from Don <clugdbug@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: -------
August 12, 2010
[Issue 314] [module] Static, renamed, and selective imports are always public
http://d.puremagic.com/issues/show_bug.cgi?id=314



--- Comment #19 from Christian Kamm <kamm-removethis@incasoftware.de> 2010-08-11 22:09:51 PDT ---
Don, which version of the patch did you apply - the one attached here or the
one I applied to LDC? Selective imports work correctly in LDC, so maybe there's
some extra work needed for D2. I also expect the patch to require some work
with regard to overload resolution, it works differently in D2.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
1 2 3 4 5
Top | Discussion index | About this forum | D home