[Issue 11038] New: static has no effect as a block attribute for imports

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Sep 14 06:44:34 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=11038

           Summary: static has no effect as a block attribute for imports
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: andrej.mitrovich at gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-09-14 06:44:33 PDT ---
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
}
-----

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list