dmd segfaults
matovitch via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat May 31 10:09:30 PDT 2014
On Saturday, 31 May 2014 at 17:01:23 UTC, bearophile wrote:
> matovitch:
>
>> Does anybody knows why dmd segfaults on this code ? Should I
>> report this as a bug ?
>
> Please report this minimized case to Bugzilla:
>
>
> struct Foo(int[] arr) {
> const int[] arr = arr;
> }
> void main() {
> Foo!([0]) foo;
> }
>
>
> The error it gives before the crash:
>
> test.d(2,17): Deprecation: variable test.Foo!([0]).Foo.arr
> const field with initializer should be static, __gshared, or an
> enum
>
>
> The cause of the crash if that the local variable has the same
> name as the template argument, combined with the reported error.
>
> Bye,
> bearophile
Thanks ! I should have minimized it. Anyway I discovered I had
already a bugzilla account unfortunately I can't remember my
password and the email takes his time... :-(
More information about the Digitalmars-d-learn
mailing list