www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - private import (another - simple example)

this compiles and runs
unless the first line of d1.d is removed.

seems to me that the priate import on d1.d
is visible on d2.d

seems to me that the compiler should complain on the 
std.string.toString on d2.d

maybe if the compiler issues the apropriate error
we can figure what's wrong with the other
"private import" bug.


private import std.string;

class D1
{
	this()
	{
	}
}

int main(char[][] args)
{
	return 0;
}



private import d1;

class D2
{
	this()
	{
		printf("D2.this %.*s\n", std.string.toString(1));
	}
}


compiles and generates the exec:
$ dmd d1.d d2.d -I~/dmd/src/phobos

compiles:
$ dmd d2.d -I~/dmd/src/phobos -c

Ant
May 31 2004