digitalmars.D.bugs - [Issue 17353] New: is expression type specialization matching strips
- via Digitalmars-d-bugs (24/24) Apr 26 2017 https://issues.dlang.org/show_bug.cgi?id=17353
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 puremagic.com Reporter: david.eckardt 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. --
Apr 26 2017