http://d.puremagic.com/issues/show_bug.cgi?id=4309
Summary: String literal passed by ref causes segfault Product: D Version: D2 Platform: Other OS/Version: Linux Status: NEW Keywords: accepts-invalid Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bugzi...@kyllingen.net --- Comment #0 from Lars T. Kyllingstad <bugzi...@kyllingen.net> 2010-06-14 05:20:01 PDT --- The following compiles, but causes a segmentation fault when run: void foo(ref string s) { s = "hello yourself"; // Anything that changes s will do. } void main() { foo("hello"); } I'm guessing that the compiler should catch this and provide an error saying "hello" is not an lvalue. At least that's what it does if one tries something similar with an array literal. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------