digitalmars.D.bugs - [Issue 17942] New: Enums are evaluated differently in global scope
- d-bugmail puremagic.com (24/24) Oct 26 2017 https://issues.dlang.org/show_bug.cgi?id=17942
https://issues.dlang.org/show_bug.cgi?id=17942 Issue ID: 17942 Summary: Enums are evaluated differently in global scope Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: blocker Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: temtaime gmail.com import std.meta; enum B = aliasSeqOf!(gen()); // fails void main() { enum A = aliasSeqOf!(gen()); //works } string[] gen() { return null; // change to [ `` ] makes error go away } --
Oct 26 2017