Bug 12880 – [REG2.066a] Wrong IFTI for string.init argument
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-06-08T20:02:00Z
Last change time
2014-06-09T04:32:04Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
sludwig
Comments
Comment #0 by sludwig — 2014-06-08T20:02:37Z
The following code errors out on DMD master (works correctly on previous
releases):
---
void test(T)(in T value) { static assert(is(T == string)); }
void main() { test(string.init); }
---
DMD v2.066 DEBUG
bug_dmd_templ.d(1): Error: static assert (is(const(immutable(char)[]) ==
string)) is false
bug_dmd_templ.d(2): instantiated from here:
test!(const(immutable(char)[]))
The "const" should be dropped for the inferred template argument.