D-Programming-Language/dmd — pull request #488 by donc (2011-11-02 13:33:37+00:00)
Title: Support classes and interfaces in CTFE

I've implemented this by introducing a CTFE-only 'class reference expression'. The members are stored in a StructLiteral, so the changes required to the CTFE engine were surprisingly small.

The recent CTFE try/finally patch caused a spurious merge conflict, so I've also merged in pull request 448,
which was a precondition for this one.
https://github.com/D-Programming-Language/dmd/pull/448
There's also a couple of bugs with simple fixes in here.

Bugs fixed:
4047 [CTFE] class/struct heap allocation
6603 [CTFE] Can't call through a manifest constant function pointer
6792 [CTFE] ICE with pointer cast of indexed array
6800 [CTFE] dangerous pointer casts should be rejected
6816 [CTFE] nested function can't access this
6817 [CTFE] Error on interpreting inlined IfStatement