diff --git a/test/fail_compilation/imports/test313a.d b/test/fail_compilation/imports/test313a.d new file mode 100644 index 000000000000..ca3a61e57681 --- /dev/null +++ b/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; diff --git a/test/fail_compilation/test313.d b/test/fail_compilation/test313.d new file mode 100644 index 000000000000..bba428ec1746 --- /dev/null +++ b/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"); +}