Bug 2393 – Regression(1.032, D1 only) IFTI on (T:char)(T[]) vs (T:dchar)(T[])

Status
RESOLVED
Resolution
WONTFIX
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2008-10-04T17:05:00Z
Last change time
2014-03-01T00:36:28Z
Keywords
rejects-valid
Assigned to
nobody
Creator
bus_dbugzilla

Comments

Comment #0 by bus_dbugzilla — 2008-10-04T17:05:00Z
The following code worked fine in 1.029, but is broken in 1.033 and 1.035 (no other versions tested): void fooA(T:char) (T chr) { } void fooA(T:dchar)(T chr) { } void fooB(T:char) (T[] str) { } void fooB(T:dchar)(T[] str) { } void main() { // Ok in all versions fooA('c'); // DMD 1.029: Ok // DMD 1.033 and 1.035: template main.fooB(T : char) fooB(T : char) matches more than one function template declaration, fooB(T : char) and fooB(T : dchar) fooB("str"c); }
Comment #1 by clugdbug — 2010-01-25T01:28:25Z
It worked on 1.030. For D2, it was fixed in 2.023.
Comment #2 by clugdbug — 2010-08-31T02:29:56Z
This worked on 1.031, but fails on 1.032 and later.
Comment #3 by bugzilla — 2012-01-31T19:11:10Z
The way this was 'fixed' in D2 was to type string literals as dynamic arrays rather than static ones, along with various other string literal changes. Applying this fix to D1 breaks the test suite. I'm concerned that this would be a disruptive change to D1, rather than an improvement, which is not what we should be doing for D1 users.