Symbol lookup rules and imports

Martin Nowak via Digitalmars-d digitalmars-d at puremagic.com
Wed Dec 3 08:15:38 PST 2014


On 12/03/2014 12:55 AM, H. S. Teoh via Digitalmars-d wrote:
> 	struct S {
> 		static import std.format;
> 		alias format = std.format.format;
> 		// ^^^ the above line is what makes s.format() break.
> 	}

It's equivalent to

     private alias format = std.format.format;

The problem here is that private isn't checked for aliases and that it 
currently doesn't affect visibility.


More information about the Digitalmars-d mailing list