[Issue 7386] Can't use a 'version' that was set inside 'static if'

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jul 12 14:22:10 UTC 2021


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

anonymous4 <dfj1esp02 at sneakemail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|rejects-valid               |spec
           Severity|major                       |enhancement

--- Comment #3 from anonymous4 <dfj1esp02 at sneakemail.com> ---
It feels like version is a lightweight feature and is processed early as it
doesn't depend much on semantics of the surrounding code, while static if tends
to be processed on later stages as it needs module that passed most semantic
checks.
As a workaround the original example can simply use static if everywhere;
static if can inspect versions too: see issue 7417

--


More information about the Digitalmars-d-bugs mailing list