[Issue 314] [module] Static, renamed, and selective imports are always public

2020-09-09 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=314

--- Comment #59 from Dlang Bot  ---
dlang/dmd pull request #11704 "Improve error message for 'already defined
error'" was merged into master:

- ee023891d1b0a33b128087d2849b18543bc34aa8 by Geod24:
  Improve error message for 'already defined error'

  Those errors message could get very confusing if the package name was common.
  In this case, core is used, but working in 'dub' is another situation I
encountered.
  The 'fail314' test didn't have anything to do with issue 314 so was merged
with the others.
  I couldn't find a way to trigger the error message on inserting the template
parameter,
  so it was left as-is.

https://github.com/dlang/dmd/pull/11704

--


[Issue 314] [module] Static, renamed, and selective imports are always public

2017-07-01 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=314

Vladimir Panteleev  changed:

   What|Removed |Added

 CC||n...@wabbo.org

--- Comment #58 from Vladimir Panteleev  ---
*** Issue 11794 has been marked as a duplicate of this issue. ***

--


[Issue 314] [module] Static, renamed, and selective imports are always public

2016-05-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=314

--- Comment #57 from github-bugzi...@puremagic.com ---
Commit pushed to master at https://github.com/dlang/phobos

https://github.com/dlang/phobos/commit/3d37aee77d12e13b970a84d3e06101e5fd04a00c
Byte Order Mark (BOM) handling functions rewrite

* move to std.encoding
* less overengineering

https://github.com/D-Programming-Language/phobos/pull/3870 rework

Don't use top-level selective import in std.math because of DMD issue 314.

some quickfur comments

whitespace

remove used import

steven suggestion

utfBom

andrei nitpicks

andrei null

--


[Issue 314] [module] Static, renamed, and selective imports are always public

2016-03-19 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=314

--- Comment #56 from github-bugzi...@puremagic.com ---
Commits pushed to stable at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/03ec7f38bd29d1c6eb851e4516b74370345e9e49
Don't use top-level selective import in std.math because of DMD issue 314.

https://github.com/D-Programming-Language/phobos/commit/33dbfa819fafd4d78378b9ca0e5086ffe824d485
Merge pull request #3961 from tsbockman/math_import_fix

--


[Issue 314] [module] Static, renamed, and selective imports are always public

2016-03-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=314

Denis Shelomovskij  changed:

   What|Removed |Added

 CC||verylonglogin@gmail.com

--- Comment #55 from Denis Shelomovskij  ---
(In reply to Jonathan M Davis from comment #54)
> (In reply to Leandro Lucarella from comment #53)
> > Is this time for real? I think I'm gonna cry.
> 
> It is, but the new import semantics that came with fixing various import
> bugs for the next release are surprising to a number of us.

So it would be good to post a link to its description here.

--


[Issue 314] [module] Static, renamed, and selective imports are always public

2016-03-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=314

--- Comment #54 from Jonathan M Davis  ---
(In reply to Leandro Lucarella from comment #53)
> Is this time for real? I think I'm gonna cry.

It is, but the new import semantics that came with fixing various import bugs
for the next release are surprising to a number of us. The number of resulting
deprecation messages in Phobos was quite large, and it's quite likely that
there's a lot of code out there that's going to at minimum get a lot of
deprecation messages and probably end up with broken code due to imports that
don't work as expected anymore. We may be better off in the long run (and
certainly, finally getting bugs like this fixed is fantastic), but I can't say
that I'm particularly enthused with the resulting semantics, and it's going to
take some getting used to.

--


[Issue 314] [module] Static, renamed, and selective imports are always public

2016-03-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=314

--- Comment #53 from Leandro Lucarella  ---
Is this time for real? I think I'm gonna cry.

--


[Issue 314] [module] Static, renamed, and selective imports are always public

2016-03-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=314

github-bugzi...@puremagic.com changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |FIXED

--


[Issue 314] [module] Static, renamed, and selective imports are always public

2016-03-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=314

--- Comment #52 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/7cf24a4b5f07f920c0d772ac84a3c5547db2c538
fix Issue 314 - static, renamed, and selective imports are always public

- enable protection for imports (unless -transition=import or
  -transition=checkimports is used)
- relies on DIP22 in order to resolve public/private symbol conflicts
  hence cannot be enabled when DIP22 is turned off by the transition
  switches

https://github.com/D-Programming-Language/dmd/commit/8be10ece1b6f81a81f8c794b258ca2c49a9e7652
Merge pull request #5485 from MartinNowak/fix314

fix Issue 314 - static, renamed, and selective imports are always public

--


[Issue 314] [module] Static, renamed, and selective imports are always public

2016-02-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=314
Issue 314 depends on issue 313, which changed state.

Issue 313 Summary: [module] Fully qualified names bypass private imports
https://issues.dlang.org/show_bug.cgi?id=313

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |FIXED

--


[Issue 314] [module] Static, renamed, and selective imports are always public

2016-01-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=314

--- Comment #51 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/03ec7f38bd29d1c6eb851e4516b74370345e9e49
Don't use top-level selective import in std.math because of DMD issue 314.

https://github.com/D-Programming-Language/phobos/commit/33dbfa819fafd4d78378b9ca0e5086ffe824d485
Merge pull request #3961 from tsbockman/math_import_fix

Don't use selective import in std.math due to DMD issue 314.

--


[Issue 314] [module] Static, renamed, and selective imports are always public

2015-12-07 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=314

Paolo Invernizzi  changed:

   What|Removed |Added

 CC||paolo.inverni...@gmail.com

--


[Issue 314] [module] Static, renamed, and selective imports are always public

2015-06-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=314

Andrei Alexandrescu and...@erdani.com changed:

   What|Removed |Added

Version|D1  D2 |D2

--


[Issue 314] [module] Static, renamed, and selective imports are always public

2014-08-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=314

hst...@quickfur.ath.cx changed:

   What|Removed |Added

 CC||hst...@quickfur.ath.cx

--


[Issue 314] [module] Static, renamed, and selective imports are always public

2014-05-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=314

--- Comment #49 from Orvid King blah38...@gmail.com ---
So, can this bug finally be marked as fixed now that the PRs for it have been 
merged?

--


[Issue 314] [module] Static, renamed, and selective imports are always public

2014-05-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=314

--- Comment #50 from Kenji Hara k.hara...@gmail.com ---
(In reply to Orvid King from comment #49)
 So, can this bug finally be marked as fixed now that the PRs for it have
 been merged?

No. Some behavior changed whcch introduced by the merged PR (#2256) could not
get agreement, and it was finally reverted. So this issue is not yet fixed in
git-head.

Instead of that, I'm opening more conservative fix for the issues 313  314.

https://github.com/D-Programming-Language/dmd/pull/3407

--


[Issue 314] [module] Static, renamed, and selective imports are always public

2014-04-23 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=314

--- Comment #48 from github-bugzi...@puremagic.com ---
Commit pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/21a2d202098900148878a0e358052b3ec15d8ac4
Address problems with issue 314

--


[Issue 314] [module] Static, renamed, and selective imports are always public

2013-12-24 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=314



--- Comment #47 from github-bugzi...@puremagic.com 2013-12-24 00:31:41 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/3e791f6bc6046e4ca7e9e650a573ffaa9f0c3403
Add import declarations for issue 313  314

https://github.com/D-Programming-Language/phobos/commit/e2e986c7b6533c9042dbbdc23960e287e206ea12
Merge pull request #1811 from 9rnsr/fix_imports

Add import declarations for issue 313  314

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 314] [module] Static, renamed, and selective imports are always public

2013-06-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=314


Kenji Hara k.hara...@gmail.com changed:

   What|Removed |Added

   Keywords||pull


--- Comment #45 from Kenji Hara k.hara...@gmail.com 2013-06-24 23:04:17 PDT 
---
https://github.com/D-Programming-Language/dmd/pull/2256

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 314] [module] Static, renamed, and selective imports are always public

2013-06-24 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=314



--- Comment #43 from github-bugzi...@puremagic.com 2013-06-24 09:43:57 PDT ---
Commit pushed to master at https://github.com/D-Programming-Language/druntime

https://github.com/D-Programming-Language/druntime/commit/efe7e94030d75780b16a4eaf45c8dfb789c899aa
Merge pull request #532 from 9rnsr/fix_imports

Issue 313  314 - Add package access to rt.lifetime.BlkInfo

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 314] [module] Static, renamed, and selective imports are always public

2013-06-24 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=314



--- Comment #44 from github-bugzi...@puremagic.com 2013-06-24 18:48:57 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/03a32d6fa4635543eed17b874fbf7a0330572ac3
Fix issue 313  314

https://github.com/D-Programming-Language/phobos/commit/b7216eae2e9ec73e186a713c59839fd91c9347b7
Merge pull request #1368 from 9rnsr/fix_imports

Fix issue 313  314 - Add necessary imports and fix FQN accesses

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 314] [module] Static, renamed, and selective imports are always public

2013-02-24 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=314



--- Comment #42 from Marco Leise marco.le...@gmx.de 2013-02-24 17:22:23 PST 
---
(In reply to comment #21)
 In my understanding, import std.stdio : writefln; only imports the name
 writefln, not std and writefln. If the user wants std, he has to write
 static import std.stdio;. I would assume your example is invalid and is
 expected to fail.
 
 Why would the user do import std.stdio : writefln; if he doesn't use 
 writefln
 directly? Is std.stdio.writefln the only name he's supposed to be able to 
 use
 here? If yes, what the hell is the use of that?

The use case is this:

import std.stdio : File;
import std.stream : File;
...
new std.stream.File(...);

There is no reason for that to fail.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 314] [module] Static, renamed, and selective imports are always public

2013-02-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=314


Andrej Mitrovic andrej.mitrov...@gmail.com changed:

   What|Removed |Added

 CC||jmdavisp...@gmx.com


--- Comment #41 from Andrej Mitrovic andrej.mitrov...@gmail.com 2013-02-15 
08:20:36 PST ---
*** Issue 9516 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: ---


[Issue 314] [module] Static, renamed, and selective imports are always public

2012-02-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=314


Walter Bright bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |


--- Comment #40 from Walter Bright bugzi...@digitalmars.com 2012-02-13 
12:36:49 PST ---
Reopened because the original test case now fails again due to the revert.

Please, folks, when doing pull requests that fix problems, add the cases into
the test suite. The current test suite passes even with the reversion, meaning
that no useful test cases were added with the patch.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 314] [module] Static, renamed, and selective imports are always public

2012-02-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=314



--- Comment #39 from github-bugzi...@puremagic.com 2012-02-12 17:18:07 PST ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/c022036c8f9fea1672bb2c56edd610715f6335c8
Revert Merge pull request #591 from ckamm/bug314

This reverts commit ff9fa25f3f7f3091787f7459e1950add6cff50b2, reversing
changes made to 227769c47847fd577d423469c656e7a72246553c.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 314] [module] Static, renamed, and selective imports are always public

2012-01-29 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=314



--- Comment #38 from Walter Bright bugzi...@digitalmars.com 2012-01-29 
17:13:18 PST ---
(In reply to comment #33)
 https://github.com/D-Programming-Language/dmd/pull/190

The pull breaks Issue 7373. Christian, can you have a look, please?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 314] [module] Static, renamed, and selective imports are always public

2012-01-24 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=314



--- Comment #37 from Don clugd...@yahoo.com.au 2012-01-24 12:14:56 PST ---
*** Issue 5161 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: ---


[Issue 314] [module] Static, renamed, and selective imports are always public

2012-01-01 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=314


Walter Bright bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


--- Comment #35 from Walter Bright bugzi...@digitalmars.com 2012-01-01 
14:26:53 PST ---
https://github.com/D-Programming-Language/dmd/commit/ff9fa25f3f7f3091787f7459e1950add6cff50b2

https://github.com/D-Programming-Language/dmd/commit/93a643aba6f62db1b7658c2bfb51f9d0b576c337

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 314] [module] Static, renamed, and selective imports are always public

2012-01-01 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=314



--- Comment #36 from Leandro Lucarella llu...@gmail.com 2012-01-01 16:04:19 
PST ---
And the most voted bug from all times (41 votes, the next most voted have 28
votes) finally get fixed.

Thanks for the persistence, ckamm!!! :)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 314] [module] Static, renamed, and selective imports are always public

2011-11-09 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=314



--- Comment #34 from Leandro Lucarella llu...@gmail.com 2011-11-09 06:23:50 
PST ---
(In reply to comment #33)
 https://github.com/D-Programming-Language/dmd/pull/190

So it looks like the patch is good and ready, when are you planning to merge
it?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 314] [module] Static, renamed, and selective imports are always public

2011-07-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=314



--- Comment #33 from Christian Kamm kamm-removet...@incasoftware.de 
2011-07-03 11:40:11 PDT ---
https://github.com/D-Programming-Language/dmd/pull/190

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 314] [module] Static, renamed, and selective imports are always public

2011-05-29 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=314


Mike Parker aldac...@gmail.com changed:

   What|Removed |Added

 CC||aldac...@gmail.com


--- Comment #32 from Mike Parker aldac...@gmail.com 2011-05-29 00:10:41 PDT 
---
I was just bitten by this one testing out a library I'm developing. I use
private selective imports in it quite heavily. It was confused when I started
getting conflicts. It only took a minute or two to figure out what was going
on, but now I have to go through and eliminate all of the selective imports.
This bug renders them useless. I'm amazed this has been open for so long. It
seems like a pretty major issue to me.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 314] [module] Static, renamed, and selective imports are always public

2010-11-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=314



--- Comment #30 from st...@despam.it 2010-11-03 18:36:23 PDT ---
How embarrassing this might be, this needs a warning on the website.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 314] [module] Static, renamed, and selective imports are always public

2010-11-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=314



--- Comment #30 from st...@despam.it 2010-11-03 18:36:23 PDT ---
How embarrassing this might be, this needs a warning on the website.

--- Comment #31 from st...@despam.it 2010-11-03 18:39:07 PDT ---
How embarrassing this might be, this needs a warning on the website.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 314] [module] Static, renamed, and selective imports are always public

2010-08-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=314



--- Comment #28 from Christian Kamm kamm-removet...@incasoftware.de 
2010-08-20 07:48:05 PDT ---
 But if you can write the
 essence of the code here, which I think is really only a couple of functions,
 that should be enough.

AliasDeclaration and FuncAliasDeclaration get a new 'importprot' member which
is set for aliases generated by the import declaration and stores the import's
protection.

In ScopeDSymbol::search, we discard aliases which shouldn't be accessible -
unless it's a FuncAliasDeclaration, to avoid making a chain invisible because
the first member is privately imported:
+// hide the aliases generated by selective or renamed private imports
+if (s  flags  1)
+if (AliasDeclaration* ad = s-isAliasDeclaration())
+// may be a private alias to a function that is overloaded. these
+// are sorted out during overload resolution, accept them here
+if (ad-importprot == PROTprivate 
!ad-aliassym-isFuncAliasDeclaration())
+s = NULL;

And for overload resolution, skip over functions that should be invisible:
-int overloadApply(FuncDeclaration *fstart,
+int overloadApply(Module* from, FuncDeclaration *fstart,
 int (*fp)(void *, FuncDeclaration *),
 void *param)
...
 if (fa)
 {
-if (overloadApply(fa-funcalias, fp, param))
-return 1;
+if (fa-getModule() == from || fa-importprot != PROTprivate)
+if (overloadApply(from, fa-funcalias, fp, param))
+return 1;
 next = fa-overnext;

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 314] [module] Static, renamed, and selective imports are always public

2010-08-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=314



--- Comment #27 from Don clugd...@yahoo.com.au 2010-08-19 07:39:48 PDT ---
(In reply to comment #24)
 (In reply to comment #20)
  (In reply to comment #19)
   Don, which version of the patch did you apply - the one attached here or 
   the
   one I applied to LDC? 
  
  The one attached here.
 
 Well, as Walter pointed out the attached patch has problems with overload
 resolution. The corrected patch doesn't though. If you're interested in 
 looking
 at it, I could make it work against the D2 frontend and post it here.
 
 I don't want the effort to be in vain though, so could you check with Walter
 whether he'd accept a patch that works as described in comment #9?

From discussion with Walter --
It's too difficult to evaluate the patch in its present form. It's in two
parts, both diffed against the LDC codebase rather than DMD, and the context is
really unclear -- it's not clear which functions are being patched. I don't
think a complete patch is required for evaluation -- in fact, a complete patch
would be  more difficult to quickly understand. But if you can write the
essence of the code here, which I think is really only a couple of functions,
that should be enough. And with a explanation of what it's doing. Leave out the
myriad of changes which are just passing the module handle around.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 314] [module] Static, renamed, and selective imports are always public

2010-08-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=314



--- Comment #20 from Don clugd...@yahoo.com.au 2010-08-12 01:04:26 PDT ---
(In reply to comment #19)
 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.

The one attached here. Although I've found some problems with selective
imports, I no longer think they are the fault of this patch. For example, the
existing release of D1 doesn't like this example:
---
import std.stdio : writefln;
void main() {
   std.stdio.writefln(xyz);
}

test0.d(338): Error: undefined identifier std
Error: no property 'writefln' for type 'TOK149'
test0.d(338): Error: function expected before (), not __error of type TOK149
---
After applying the patch and my change to Id::object, and fixing a bug in each
of druntime, Phobos, and the test suite, all Phobos unittests pass, and the DMD
test suite passes all tests. Looks great to me.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 314] [module] Static, renamed, and selective imports are always public

2010-08-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=314



--- Comment #21 from nfx...@gmail.com 2010-08-12 06:11:44 PDT ---
In my understanding, import std.stdio : writefln; only imports the name
writefln, not std and writefln. If the user wants std, he has to write
static import std.stdio;. I would assume your example is invalid and is
expected to fail.

Why would the user do import std.stdio : writefln; if he doesn't use writefln
directly? Is std.stdio.writefln the only name he's supposed to be able to use
here? If yes, what the hell is the use of that?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 314] [module] Static, renamed, and selective imports are always public

2010-08-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=314



--- Comment #22 from Don clugd...@yahoo.com.au 2010-08-12 07:09:34 PDT ---
(In reply to comment #21)
 In my understanding, import std.stdio : writefln; only imports the name
 writefln, not std and writefln. If the user wants std, he has to write
 static import std.stdio;. I would assume your example is invalid and is
 expected to fail.
 
 Why would the user do import std.stdio : writefln; if he doesn't use 
 writefln
 directly? Is std.stdio.writefln the only name he's supposed to be able to 
 use
 here? If yes, what the hell is the use of that?

It's invalid code. But you should never see TOKxxx in an error message. It
indicates something is fouled up.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 314] [module] Static, renamed, and selective imports are always public

2010-08-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=314



--- Comment #23 from Leandro Lucarella llu...@gmail.com 2010-08-12 07:25:12 
PDT ---
(In reply to comment #22)
 (In reply to comment #21)
  In my understanding, import std.stdio : writefln; only imports the name
  writefln, not std and writefln. If the user wants std, he has to 
  write
  static import std.stdio;. I would assume your example is invalid and is
  expected to fail.
  
  Why would the user do import std.stdio : writefln; if he doesn't use 
  writefln
  directly? Is std.stdio.writefln the only name he's supposed to be able to 
  use
  here? If yes, what the hell is the use of that?
 
 It's invalid code. But you should never see TOKxxx in an error message. It
 indicates something is fouled up.

One more for bug 4329 =)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 314] [module] Static, renamed, and selective imports are always public

2010-08-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=314



--- Comment #24 from Christian Kamm kamm-removet...@incasoftware.de 
2010-08-12 10:33:50 PDT ---
(In reply to comment #20)
 (In reply to comment #19)
  Don, which version of the patch did you apply - the one attached here or the
  one I applied to LDC? 
 
 The one attached here.

Well, ass Walter pointed out the attached patch has problems with overload
resolution. The corrected patch doesn't though. If you're interested in looking
at it, I could make it work against the D2 frontend and post it here.

I don't want the effort to be in vain though, so could you check with Walter
whether he'd accept a patch that works as described in comment #9?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 314] [module] Static, renamed, and selective imports are always public

2010-08-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=314



--- Comment #25 from Christian Kamm kamm-removet...@incasoftware.de 
2010-08-12 10:45:00 PDT ---
Gah, can you edit comments somehow? That typo is extremely embarrassing.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 314] [module] Static, renamed, and selective imports are always public

2010-08-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=314


Don clugd...@yahoo.com.au changed:

   What|Removed |Added

 Attachment #364 is|0   |1
   obsolete||


--- Comment #26 from Don clugd...@yahoo.com.au 2010-08-12 12:08:52 PDT ---
(From update of attachment 364)
Marking this patch as obsolete, since it is not correct.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 314] [module] Static, renamed, and selective imports are always public

2010-08-11 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=314


Don clugd...@yahoo.com.au changed:

   What|Removed |Added

 CC||clugd...@yahoo.com.au


--- Comment #18 from Don clugd...@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: ---


[Issue 314] [module] Static, renamed, and selective imports are always public

2010-05-26 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=314


Trass3r mrmoc...@gmx.de changed:

   What|Removed |Added

 CC||mrmoc...@gmx.de


--- Comment #14 from Trass3r mrmoc...@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: ---


[Issue 314] [module] Static, renamed, and selective imports are always public

2010-05-26 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=314



--- Comment #15 from Leandro Lucarella llu...@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: ---


[Issue 314] [module] Static, renamed, and selective imports are always public

2010-05-26 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=314



--- Comment #16 from Trass3r mrmoc...@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: ---


[Issue 314] [module] Static, renamed, and selective imports are always public

2010-05-26 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=314



--- Comment #17 from Leandro Lucarella llu...@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: ---


[Issue 314] [module] Static, renamed, and selective imports are always public

2010-05-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=314


nfx...@gmail.com changed:

   What|Removed |Added

 CC||nfx...@gmail.com


--- Comment #12 from nfx...@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: ---


[Issue 314] [module] Static, renamed, and selective imports are always public

2010-05-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=314


Tomas Lindquist Olsen to...@famolsen.dk changed:

   What|Removed |Added

 CC||to...@famolsen.dk


--- Comment #13 from Tomas Lindquist Olsen to...@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: ---