Bug 15778 – [REG2.064] polysemous string type doesn't work in array operation
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-03-08T19:33:11Z
Last change time
2020-03-21T03:56:32Z
Keywords
pull, rejects-valid
Assigned to
No Owner
Creator
anonymous4
Comments
Comment #0 by dfj1esp02 — 2016-03-08T19:33:11Z
void f(wchar[] s)
{
s[]="a";
}
Error: cannot implicitly convert expression ("a") of type string to wchar[]
Comment #1 by ag0aep6g — 2016-03-08T21:00:40Z
The 'regression' severity level indicates that the code works with a previous version of dmd. What version does it work with?
Comment #2 by b2.temp — 2016-03-09T02:33:33Z
void f(wchar[] s)
{
s[]="a"w;
}
works.
Obviously in the original example it fails because of the encoding of the literal and the one of the target variable is not the same.
Did it use to work ? (even with IDEone, dmd 2.067, it fails).
(In reply to ag0aep6g from comment #1)
> The 'regression' severity level indicates that the code works with a
> previous version of dmd. What version does it work with?
I upgraded from 2.063 :3