Static function at module level

Phil Lavoie via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Aug 18 08:30:02 PDT 2014


On Monday, 18 August 2014 at 14:23:47 UTC, bearophile wrote:
> H. S. Teoh:
>
>> Is there a bug filed for this?
>
> Probably there is. But I stopped filing similar bugs because 
> they seem to have a very low priority.
>
> Bye,
> bearophile

I looked around for it but didn't find it. I filed this one: 
https://issues.dlang.org/show_bug.cgi?id=13322

As you'll see, every type of module level declaration accepts 
static.
static int x;
static void myFunc(){}
static interface MyInterface{}
static class MyClass{}
static struct MyStruct{}
static template myTemplate{}

And maybe I am missing some.


More information about the Digitalmars-d-learn mailing list