Bug 13757 – [CTFE] extern(C) alias declaration does not work in CTFE
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-11-20T08:40:00Z
Last change time
2015-02-18T03:39:47Z
Keywords
CTFE, rejects-valid
Assigned to
nobody
Creator
k.hara.pg
Comments
Comment #0 by k.hara.pg — 2014-11-20T08:40:28Z
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)())