Mercurial > projects > ldc
view tests/mini/classinfo5.d @ 797:340acf1535d0
Removed KDevelop3 project files, CMake can generate them just fine!
Fixed function literals in static initializers.
Changed alignment of delegates from 2*PTRSIZE to just PTRSIZE.
Changed errors to go to stderr instead of stdout.
Fairly major rewriting of struct/union/class handling, STILL A BIT BUGGY !!!
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Sat, 29 Nov 2008 21:25:43 +0100 |
parents | 8d46c475842a |
children |
line wrap: on
line source
extern(C) int printf(char*, ...); class BaseClass {} void main() { Object o_cr = BaseClass.classinfo.create(); Object o_new = new BaseClass; printf("CIaddr: %X\n", cast(size_t*)BaseClass.classinfo); printf("Create: %X\n", cast(size_t*)o_cr.classinfo); printf("New: %X\n", cast(size_t*)o_new.classinfo); assert(cast(size_t*)o_cr.classinfo == cast(size_t*)o_new.classinfo); }