http://d.puremagic.com/issues/show_bug.cgi?id=9671
Summary: Getting class object typeid in CTFE is not supported
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: CTFE
Severity: major
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
Blocks: 3789
--- Comment #0 from Kenji Hara <[email protected]> 2013-03-09 02:39:16 PST ---
This code should work.
class Class {}
bool test1()
{
Object c = new Class;
return typeid(c) is typeid(c);
}
static assert(test1() == true);
bool test2()
{
Object c = new Class;
Object o = new Object;
return typeid(c) is typeid(o);
}
static assert(test2() == false);
This is necessary for class object comparison in CTFE.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------