Bug 7123 – static assert(is(typeof(toDelegate(&main)))) is false
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-12-17T00:24:00Z
Last change time
2011-12-18T20:22:23Z
Keywords
patch, wrong-code
Assigned to
nobody
Creator
zan77137
Comments
Comment #0 by zan77137 — 2011-12-17T00:24:30Z
This code should be compilable.
import std.functional;
void main()
{
version(Workaround) typeof(toDelegate(&main)) dgDummy; // <- Code is compilable if this line is enabled.
static assert(is(typeof(toDelegate(&main)))); // NG: false
}