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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Apr 11 07:41:28 UTC 2022


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

KytoDragon <kytodragon at e.mail.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kytodragon at e.mail.de

--- Comment #4 from KytoDragon <kytodragon at e.mail.de> ---
(In reply to anonymous4 from comment #3)
> 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

There are few bugs related to static if (see
https://issues.dlang.org/show_bug.cgi?id=20905), so replacing all versions with
static if is not currently possible.

--


More information about the Digitalmars-d-bugs mailing list