[Issue 16666] type inside 'static if' can't be used before import
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jun 2 16:49:19 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=16666
kinke <kinke at gmx.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |industry
CC| |kinke at gmx.net
Severity|normal |critical
--- Comment #3 from kinke <kinke at gmx.net> ---
Raising importance to critical, as we seem to have hit the same problem with
v2.100, dustmited to a trivial
```
// crypto.d:
import types;
int EVP_PKEY_derive_init_ex(EVP_KEYEXCH*);
// types.d:
import crypto;
version (WORKING)
struct EVP_KEYEXCH;
else static if (true)
struct EVP_KEYEXCH;
```
`dmd -o- types.d` fails with an 'undefined identifier EVP_KEYEXCH' error;
`-version=WORKING` makes it work, showing the difference of static-if vs.
version condition. Compiling the other module (`dmd -o- crypto.d`) works fine.
--
More information about the Digitalmars-d-bugs
mailing list