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

--- Comment #0 from Lars T. Kyllingstad <> 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()

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:
------- You are receiving this mail because: -------

Reply via email to