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)())
Comment #1 by k.hara.pg — 2014-11-20T12:01:14Z
Comment #2 by github-bugzilla — 2014-11-20T17:56:05Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/552397a2341e7fc5558461ad006d827a0b3b5ed6 fix Issue 13757 - [CTFE] extern(C) alias declaration does not work in CTFE https://github.com/D-Programming-Language/dmd/commit/16fbd453c6a464fc36826a53d77594cba6ff5cc7 Merge pull request #4153 from 9rnsr/fix13757 Issue 13757 - [CTFE] extern(C) alias declaration does not work in CTFE
Comment #3 by github-bugzilla — 2015-02-18T03:39:47Z