https://issues.dlang.org/show_bug.cgi?id=13605
Issue ID: 13605
Summary: Add ability to `version` a module declaration
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: DMD
Assignee: [email protected]
Reporter: [email protected]
The idea is to have the same module declaration in multiple files, but guarded
by `version`.
// port_linux.d
version (linux):
module port;
// port_windows.d
version (Windows):
module port;
Unfortunately, this fails to compile with the following error:
Error: Declaration expected, not 'module'
It could provide some interesting alternatives for Issue 11666.
Recently implemented related enhancements
* Issue 12567 - https://github.com/D-Programming-Language/dmd/pull/3907
* https://github.com/D-Programming-Language/dmd/pull/3947
--