[Issue 17942] New: Enums are evaluated differently in global scope

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Oct 26 16:31:53 UTC 2017


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 at puremagic.com
          Reporter: temtaime at 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
}

--


More information about the Digitalmars-d-bugs mailing list