view test/typeinfo.d @ 272:94ef6d63f7bb trunk

[svn r293] Fixed: object.TypeInfo_Struct implementation was incorrect.
author lindquist
date Wed, 18 Jun 2008 22:27:02 +0200
parents d9d5d59873d8
children
line wrap: on
line source

module typeinfo;
extern(C) int printf(char*, ...);

void main()
{
    auto ti = typeid(int);
    char[] str = ti.toString();
    printf("%.*s\n", str.length, str.ptr);
    assert(str == "int");
}