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


Andrej Mitrovic <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]


--- Comment #2 from Andrej Mitrovic <[email protected]> 2013-04-03 
00:10:22 PDT ---
(In reply to comment #0)
> This should not compile.
> 
> void f( ref string a = "" )
> {
>    a = "crash and burn";
> }
> 
> int main()
> {
> 
>   f(); // seg fault
>   return 0;
> }

P.S. isn't there a way we can put string literals in some kind of ROM on
Windows? It's just insane that it doesn't crash on Windows (ancient problem, I
know):

import std.stdio;

void f(ref string a = "")
{
    a = "crash and burn";
}

void main()
{
    f();
    writeln("");  // 'crash and burn'
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to