Bug 8234 – symbols used in CTFE affect the function literal type

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-06-13T07:33:00Z
Last change time
2015-06-17T21:03:04Z
Keywords
pull
Assigned to
nobody
Creator
timon.gehr

Comments

Comment #0 by timon.gehr — 2012-06-13T07:33:14Z
DMD 2.059: void foo(){ immutable int x = 0; static assert(is(typeof(*(){enum e=x;return e;})==function)); // fail } The static assertion should pass.
Comment #1 by clugdbug — 2012-06-26T23:48:13Z
This is not a CTFE bug. void foo() { immutable int x = 0; auto k = *(){enum e=x;return e;}; } bug.d(4): Error: can only * a pointer, not a 'immutable(int) delegate() pure nothrow @safe' Closure inference for 'is this a delegate literal' vs 'is this a function literal' incorrectly checks enum initializers. Similar to bug 6169.
Comment #2 by k.hara.pg — 2015-03-25T12:20:40Z
Comment #3 by github-bugzilla — 2015-03-27T05:10:25Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/cd3cd0dc66dbc40b9666a3b2b2b8efde8c0e0216 fix Issue 8234 - symbols used in CTFE affect the function literal type https://github.com/D-Programming-Language/dmd/commit/c420fa1f642bfcb2aa0ba4bf7778b9c34465131b Merge pull request #4517 from 9rnsr/fix8234 Issue 8234 - symbols used in CTFE affect the function literal type
Comment #4 by github-bugzilla — 2015-06-17T21:03:04Z