Re: Wrong initialization of variables
On 01.04.19 18:31, Andrey wrote: Also with AST switch I get code where there aren't any lines with text "bool hasqwerty = false;" or "bool haszaqy = false;". What happens? Compiler bug. https://issues.dlang.org/show_bug.cgi?id=19479
Wrong initialization of variables
Hello, Simple code: import std.stdio; mixin template DeclFlag(alias values) { static foreach(value; values) { mixin("bool has" ~ value ~ " = false;"); } } enum Key : string { First = "qwerty", Last = "zaqy" } void main() { enum data = [Key.First, Key.Last];