Bug 15923 – is expression qualifier matching does not work with multiple qualifiers
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2016-04-14T03:08:57Z
Last change time
2022-11-07T09:26:35Z
Assigned to
No Owner
Creator
Andrei Alexandrescu
Comments
Comment #0 by andrei — 2016-04-14T03:08:57Z
Consider:
alias T = shared(const int);
static if (is(T == shared(U), U))
pragma(msg, "works");
else
static assert(0, "does not work");
This fails to compile. The compiler should peel the "shared" and bind U to const int. This code does work:
alias T = shared(const int);
static if (is(T == shared(const(U)), U))
pragma(msg, "works");
else
static assert(0, "does not work");
Comment #1 by razvan.nitu1305 — 2022-11-07T09:26:35Z
I cannot reproduce this. Running the first version of the code yields "works". This seems to have been fixed.