www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - compiler still uses private imports out of scope

reply Ant <duitoolkit yahoo.ca> writes:
please...

###########
### exemple 1 - two modules
###########
// file ImpA.d

private import std.string;

class A
{
}

void main()
{
}

// file ImpB.d

private import ImpA;

class B
{
	void foo()
	{
		std.string.split("Hello there");
	}
}

###########
### exemple 2 - two modules
###########
// file ImpA.d
class A
{
	private import std.string;
}

void main()
{
}

// file ImpB.d
private import ImpA;

class B : A
{
	void foo()
	{
		std.string.split("Hello there");
	}
}

Ant
Jul 19 2004
next sibling parent "Walter" <newshound digitalmars.com> writes:
I know that if you use explicit qualification of a name, it will find it
despite it being in a private module. It is a bug, but I think it is a low
priority since it has to be done deliberately, and it doesn't break
anything.
Jul 19 2004
prev sibling parent Ant <Ant_member pathlink.com> writes:
When trying to compile my applications on windows
the compiler found a missing import that the linux
version didn't.

i.e. it compiles on linux but it fails in windows
until the import is added.

Ant
Oct 06 2004