[Issue 17353] New: is expression type specialization matching strips const
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Apr 26 06:02:18 PDT 2017
https://issues.dlang.org/show_bug.cgi?id=17353
Issue ID: 17353
Summary: is expression type specialization matching strips
const
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: david.eckardt at sociomantic.com
const(T[]) matches an is-expression which it shouldn't match:
---
alias const(int[]) T;
static if (is(T U == U[]))
static assert(is(T == U[])); // fails
---
The "static if" and "static assert" conditions should be equivalent so the
"static assert" should never fail. Instead the "static if" behaves as if the
is-expression would contain Unqual!T instead of T.
--
More information about the Digitalmars-d-bugs
mailing list