[Issue 13757] New: [CTFE] extern(C) alias declaration does not work in CTFE

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Nov 20 00:40:28 PST 2014


https://issues.dlang.org/show_bug.cgi?id=13757

          Issue ID: 13757
           Summary: [CTFE] extern(C) alias declaration does not work in
                    CTFE
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: CTFE, rejects-valid
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: k.hara.pg at gmail.com

Code:

static assert({
    alias FP = extern(C) int function();   
    //alias extern(C) int function() FP;   // ditto doesn't work
    return true;
}());

Output:
-----
test.d(2): Error: Declaration extern (C) alias extern (C) int function() FP;
 is not yet implemented in CTFE
test.d(5):        called from here: (*() => true)()
test.d(1):        while evaluating: static assert((*() => true)())

--


More information about the Digitalmars-d-bugs mailing list