[Issue 13322] New: Remove the ability to mark a module level declaration static
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Aug 18 08:28:14 PDT 2014
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 at puremagic.com
Reporter: maidenphil at 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
--
More information about the Digitalmars-d-bugs
mailing list