Skip to content

Commit

Permalink
fix Issue 313 - [module] Fully qualified names bypass private imports
Browse files Browse the repository at this point in the history
  • Loading branch information
9rnsr committed Mar 14, 2014
1 parent fc6a66f commit 9c204d9
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/fail_compilation/imports/test313a.d
@@ -0,0 +1,4 @@
module imports.test313a;

// explicit private no longer needed but added for clarity
private import std.stdio;
17 changes: 17 additions & 0 deletions test/fail_compilation/test313.d
@@ -0,0 +1,17 @@
/*
TEST_OUTPUT:
---
fail_compilation/test313.d(13): Error: undefined identifier writefln
fail_compilation/test313.d(16): Error: undefined identifier std
---
*/
import imports.test313a;

void main()
{
// compiler correctly reports "undefined identifier writefln"
writefln("foo");

// works fine! --> correctly reports "undefined identifier std"
std.stdio.writefln("foo");
}

0 comments on commit 9c204d9

Please sign in to comment.