Some attributes, such as public, can be used to mark several imports as public, for example: ----- module bar; public { import std.range; import std.stdio; } ----- ----- module test; import bar; void main() { writeln("foo".empty); } ----- This compiles. However static does not have an effect on imports: ----- module test; static { import std.range; import std.stdio; } void main() { writeln("foo".empty); // compiles } -----
@RazvanN7 created dlang/dmd pull request #10541 "Fix Issue 11038 - static has no effect as a block attribute for imports" fixing this issue: - Fix Issue 11038 - static has no effect as a block attribute for imports https://github.com/dlang/dmd/pull/10541
dlang/dmd pull request #10541 "Fix Issue 11038 - static has no effect as a block attribute for imports" was merged into master: - 08808ba15882d75dc5c2ca911db29150413181e8 by RazvanN7: Fix Issue 11038 - static has no effect as a block attribute for imports https://github.com/dlang/dmd/pull/10541
dlang/dmd pull request #12350 "[dmd-cxx] More fixes for package import visibility" was merged into dmd-cxx: - 4e43ce774bea36cc87fc6df027ab8a65f9db48a5 by RazvanN7: [dmd-cxx] Fix Issue 11038 - static has no effect as a block attribute for imports https://github.com/dlang/dmd/pull/12350