seg fault due to a ref parameter with default value
deadalnix
deadalnix at gmail.com
Wed Mar 20 21:08:30 PDT 2013
On Wednesday, 20 March 2013 at 23:12:37 UTC, Rob T wrote:
> void f( ref string a = "" )
> {
> a = "crash and burn";
> }
>
> main()
> {
>
> f(); // seg fault. This should not even compile.
>
> }
>
> I did not see a bug report on this one, but maybe I missed it.
>
> Any comments before I submit a bug report?
>
> --rt
I don't think "" should be an lvalue, so it should bind to ref
parameter in the first place.
More information about the Digitalmars-d
mailing list