module A;
private import file;
private import outbuffer;
void main()
{
string.toString("asdf");
OutBuffer buf = new OutBuffer();
buf.write("aaaa");
file.write("ffff",(byte[])buf.toBytes());
}
I get the compile error:
/dmd/src/phobos/file.d(7): import string conflicts with outbuffer.string at
/dmd/src/phobos/outbuffer.d(16)
if line "string.toString("asdf");" is commented out
every thing works as expected.
I tried to make the imports at file.d and outbuffer.d private
but got the same error.
Ant

Hmm, including
import string;
seems to make it work.
Ive seen similar things ( odd error messages about functions im using but
not importing ) but im not sure its an import problem.
C
"Ant" <Ant_member pathlink.com> wrote in message
news:bldr36$2u32$1 digitaldaemon.com...

/dmd/src/phobos/outbuffer.d(16)
if line "string.toString("asdf");" is commented out
every thing works as expected.
I tried to make the imports at file.d and outbuffer.d private
but got the same error.
Ant

Prima facie, because of the lack of an explicit import, the comnpiler seems
unable to disambiguate the implicitly imported string symbols from file and
outbuffer.
However, making the import string; private should lead to a different message
and that is a little concerning.
Perhaps what should be done is to only recognize first level namespaces such
that imports in imported modules are not recognized in the current module.
To be honest, I find the concept of them being automatically available somewhat
confusing, making a library function / class appear as part of the language.
Just my 2 cents.
Justin
In article <bldrk7$2v80$1 digitaldaemon.com>, Charles Sanders says...

Hmm, including
import string;
seems to make it work.
Ive seen similar things ( odd error messages about functions im using but
not importing ) but im not sure its an import problem.
C
"Ant" <Ant_member pathlink.com> wrote in message
news:bldr36$2u32$1 digitaldaemon.com...

/dmd/src/phobos/outbuffer.d(16)
if line "string.toString("asdf");" is commented out
every thing works as expected.
I tried to make the imports at file.d and outbuffer.d private
but got the same error.
Ant

Hmm, including
import string;
seems to make it work.
Ive seen similar things ( odd error messages about functions im using but
not importing ) but im not sure its an import problem.
C
"Ant" <Ant_member pathlink.com> wrote in message
news:bldr36$2u32$1 digitaldaemon.com...

/dmd/src/phobos/outbuffer.d(16)
if line "string.toString("asdf");" is commented out
every thing works as expected.
I tried to make the imports at file.d and outbuffer.d private
but got the same error.
Ant