https://issues.dlang.org/show_bug.cgi?id=13322

          Issue ID: 13322
           Summary: Remove the ability to mark a module level declaration
                    static
           Product: D
           Version: D2
          Hardware: x86_64
                OS: All
            Status: NEW
          Severity: trivial
          Priority: P1
         Component: DMD
          Assignee: [email protected]
          Reporter: [email protected]

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.

Philz

--

Reply via email to