dmd segfaults
via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat May 31 10:31:24 PDT 2014
On Saturday, 31 May 2014 at 17:22:41 UTC, matovitch wrote:
> In fact it segfauls on any template parameter if it has the
> same name as the immutable member (at least it's coherent).
> Something as simple as :
>
> struct Foo(int i)
> {
> immutable int i = i;
> }
>
> void main()
> {
> Foo!5 foo;
> writeln(foo);
> }
>
> I am suprised that nobody tried this before. BTW I am starting
> to worry : my mail didn't arrived yet. I would be very grateful
> if someone could report this for me. :S
It doesn't even need a template, this crashes too:
struct Test {
immutable float[] i = i;
}
More information about the Digitalmars-d-learn
mailing list