`static` on module-level functions

Paul Backus snarwin at gmail.com
Fri Jul 7 21:35:16 UTC 2023


On Friday, 7 July 2023 at 13:31:59 UTC, Steven Schveighoffer 
wrote:
> However, I can't think of a valid reason to allow `static` on a 
> module-level scope. Applying static to a declaration at 
> module-level should be a no-op. So maybe that's one "use" of 
> static that can be eliminated.

Well, it can be used to work around this bug:

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

So we might want to fix that issue before we make module-level 
`static` an error.


More information about the Digitalmars-d-learn mailing list