local enum

Adam D. Ruppe destructionator at gmail.com
Sat Jul 7 19:29:02 UTC 2018


On Saturday, 7 July 2018 at 18:48:35 UTC, Mr.Bingo wrote:
> The enums are local in nature and are used to store 
> intermediate results but the looping tries to redefine them, 
> which gives an error.

Have you tried putting a second set of {} around it?

static foreach(...)
{{ // 2 intentional
    enum y = whatever;
}} // 2 intentional


?


More information about the Digitalmars-d mailing list