Comment #2 by andrej.mitrovich — 2013-04-03T00:10:22Z
(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'
}
Comment #3 by github-bugzilla — 2013-04-04T12:58:18Z