Thread overview | ||||||
---|---|---|---|---|---|---|
|
February 26, 2009 'private import' and 'private alias' is not working. | ||||
---|---|---|---|---|
| ||||
I found some private attributes is not working. DMD 2.025 Windows //aaa.d private static import std.string; private alias std.string.find find; private import std.conv: to; // main.d import aaa; void main( ){ string x = "main.d"; find( x, "." ); // should be ERROR! std.string.ifind( x, "." ); // sould be ERROR? to!( wstring )( x ); // sould be ERROR? } First, 'find' in 'main.d' should not be accessible because 'alias' has 'private' attribute. Second 'std.string.ifind' should not be accessible I think, because 'std.string' in 'aaa.d' is imported privately. Third, 'to' in 'main.d' should not be accessible I think, because 'std.conv' is imported privately. If we want to use 'std.string.ifind' in 'main.d', we can import 'std.string' in 'main.d'. And the same, in order to use 'to' in 'main.d', we should import 'std.conv: to'. Less symbols we can see, more easily we can get. |
February 26, 2009 Re: 'private import' and 'private alias' is not working. | ||||
---|---|---|---|---|
| ||||
Posted in reply to CLXX | CLXX wrote:
> I found some private attributes is not working.
Private imports work if you just do "private import foo;".
They fail if the import is also static.
They fail if the import is renamed.
They fail if the import is selective.
There is a bugzilla entry for this somewhere.
|
February 27, 2009 Re: 'private import' and 'private alias' is not working. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Christopher Wright | > There is a bugzilla entry for this somewhere.
Thank you for your reply.
I'm surprised to see so early.
|
February 27, 2009 Re: 'private import' and 'private alias' is not working. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Christopher Wright | On Thu, 26 Feb 2009 18:05:46 -0500, Christopher Wright <dhasenan@gmail.com> wrote: >CLXX wrote: >> I found some private attributes is not working. > >Private imports work if you just do "private import foo;". >They fail if the import is also static. >They fail if the import is renamed. >They fail if the import is selective. >There is a bugzilla entry for this somewhere. http://d.puremagic.com/issues/show_bug.cgi?id=314 Gide |
Copyright © 1999-2021 by the D Language Foundation