view tests/mini/classinfo5.d @ 1612:081c48283153

Merge DMD r278: bugzilla 370 Compiler stack overflow on recursive... bugzilla 370 Compiler stack overflow on recursive typeof in function declaration. --- dmd/expression.c | 1 + dmd/mtype.c | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-)
author Leandro Lucarella <llucax@gmail.com>
date Wed, 06 Jan 2010 15:18:21 -0300
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);
}