why array do not support gcc style Initialize way?

ag0aep6g anonymous at example.com
Wed Sep 11 20:54:40 UTC 2019


On 11.09.19 22:36, Roberto Rosmaninho wrote:
> On Wednesday, 11 September 2019 at 19:19:51 UTC, Paul Backus wrote:
[...]
>> https://dlang.org/spec/arrays.html#static-init-static
> 
> Hey, at this section the code below:
> 
> enum Color { red, blue, green };
[...]
> Produces the output “onlineapp.d(4): Deprecation: use `{ }` for an empty 
> statement, not `;`” when I executed it.
> 
> Any clues of why it’s happened?

The semicolon after the enum is wrong.
PR to fix it: https://github.com/dlang/dlang.org/pull/2701


More information about the Digitalmars-d mailing list