www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11038] New: static has no effect as a block attribute for imports

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 puremagic.com
        ReportedBy: andrej.mitrovich gmail.com



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: -------
Sep 14 2013