www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13322] New: Remove the ability to mark a module level


          Issue ID: 13322
           Summary: Remove the ability to mark a module level declaration
           Product: D
           Version: D2
          Hardware: x86_64
                OS: All
            Status: NEW
          Severity: trivial
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: maidenphil hotmail.com

module toto;

static int x = 4;

static void myFunc(){}

static template myTemplate(){}

static struct Hello{}

static class GoodBye{}

static interface Wow{}

This compiles. It seems like static works with every module declaration, yet
changes nothing. I think it is misleading and should not compile. In the
eventuality that "static class" ever means something at module level, it would
be even more confusing if every version of the compiler allows it yet only a
few do something with it.


Aug 18 2014