digitalmars.D.bugs - [Issue 13322] New: Remove the ability to mark a module level
- via Digitalmars-d-bugs (28/28) Aug 18 2014 https://issues.dlang.org/show_bug.cgi?id=13322
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: 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. Philz --
Aug 18 2014