[Issue 12880] New: [REG2.066a] Wrong IFTI for string.init argument
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Jun 8 13:02:37 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=12880
Issue ID: 12880
Summary: [REG2.066a] Wrong IFTI for string.init argument
Product: D
Version: D2
Hardware: Other
OS: All
Status: NEW
Severity: regression
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: sludwig at outerproduct.org
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.
--
More information about the Digitalmars-d-bugs
mailing list