Re: 'static' keyword for positional array initialization

2009-08-12 Thread Don
Ali Cehreli wrote: Don Wrote: void main() { int[2] static_0 = [ 1, 1 ]; int[2] static_1 = [ 1:1 ]; } dmd: init.c:431: virtual Expression* ArrayInitializer::toExpression(): Assertion `j < edim' failed. I've added this to Bugzilla as bug 3246. With a patch . Thank you for the quick f

Re: 'static' keyword for positional array initialization

2009-08-12 Thread Ali Cehreli
Don Wrote: > > void main() > > { > > int[2] static_0 = [ 1, 1 ]; > > int[2] static_1 = [ 1:1 ]; > > } > > > > dmd: init.c:431: virtual Expression* ArrayInitializer::toExpression(): > > Assertion `j < edim' failed. > > I've added this to Bugzilla as bug 3246. With a patch . Thank you fo

Re: 'static' keyword for positional array initialization

2009-08-12 Thread Don
Ali Cehreli wrote: Lars T. Kyllingstad Wrote: I've tried with DMD 2.031, and I can't reproduce this. This works fine for me: int[2] static_0 = [ 1, 1 ]: int[2] static_1 = [ 1:1 ]; Where did you put the declarations? I've tried putting them at both module level and in a class, and both

Re: 'static' keyword for positional array initialization

2009-08-12 Thread grauzone
Ali Cehreli wrote: Lars T. Kyllingstad Wrote: I've tried with DMD 2.031, and I can't reproduce this. This works fine for me: int[2] static_0 = [ 1, 1 ]: int[2] static_1 = [ 1:1 ]; Where did you put the declarations? I've tried putting them at both module level and in a class, and both

Re: 'static' keyword for positional array initialization

2009-08-12 Thread Lars T. Kyllingstad
Ali Cehreli wrote: Lars T. Kyllingstad Wrote: I've tried with DMD 2.031, and I can't reproduce this. This works fine for me: int[2] static_0 = [ 1, 1 ]: int[2] static_1 = [ 1:1 ]; Where did you put the declarations? I've tried putting them at both module level and in a class, and both

Re: 'static' keyword for positional array initialization

2009-08-12 Thread Ali Cehreli
Lars T. Kyllingstad Wrote: > I've tried with DMD 2.031, and I can't reproduce this. This works fine > for me: > >int[2] static_0 = [ 1, 1 ]: >int[2] static_1 = [ 1:1 ]; > > Where did you put the declarations? I've tried putting them at both > module level and in a class, and both times

Re: 'static' keyword for positional array initialization

2009-08-12 Thread Lars T. Kyllingstad
Ali Cehreli wrote: The 'static' keyword is required by dmd 2.031 for the second of these two definitions: int[2] static_0 = [ 1, 1 ]; static int[2] static_1 = [ 1:1 ]; Is this inconsistency by design? Should 'static' be required for both or neither? Ali I've tried with DMD 2.031, and

'static' keyword for positional array initialization

2009-08-11 Thread Ali Cehreli
The 'static' keyword is required by dmd 2.031 for the second of these two definitions: int[2] static_0 = [ 1, 1 ]; static int[2] static_1 = [ 1:1 ]; Is this inconsistency by design? Should 'static' be required for both or neither? Ali