[Issue 5666] std.array.replace compile error (string and immutable string)
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Mar 10 01:51:30 PST 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5666
--- Comment #2 from Jonathan M Davis <jmdavisProg at gmx.com> 2011-03-10 01:48:29 PST ---
Of wait. I read that code wrong. I read it like it was
replace(r, "to be replaced", "to replace with");
Regardless, it's still wrong. As I said, replace takes a reference to a string
- notice that its signature has ref on its first parameter. You passed it a
temporary - the string literal "abcde". ref parameters _must_ refer to an
actual variable, not a temporary.
So, this is still invalid. I just gave the wrong reason. Sorry about that.
--
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