[Issue 4539] Refuse assignment to string literal

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Oct 29 09:56:11 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4539



--- Comment #6 from bearophile_hugs at eml.cc 2010-10-29 09:55:19 PDT ---
A related bug found by denis spir:

auto p = &"hello";

String literals aren't lvalues, so you can't take their address. Just as you
can't tale the address of a decimal literal:

auto q = &(1);

-- 
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