[Issue 10724] Allow slice of string literal to convert to const(char)*
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Oct 16 21:13:30 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10724
Luís Marques <luis at luismarques.eu> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |luis at luismarques.eu
--- Comment #7 from Luís Marques <luis at luismarques.eu> 2013-10-16 21:13:26 PDT ---
The following used not to work in v2.063.2:
const a = "a";
const b = a ~ "b";
const(char)* output = b;
$ Error: cannot implicitly convert expression ("ab") of type
const(immutable(char)[]) to const(char)*
Although this worked:
const b = "a" ~ "b";
const(char)* output = b;
Now both work. I assume it was the fix for this issue (10724) that also fixed
this? I say fixed because at first glance the old behavior seems wrong, but it
seems such a basic statement that I wonder why this wasn't spotted before, or
if I'm making a mistake. So please confirm this change in behavior was also
desirable.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list