annotate test/typeinfo.d @ 52:0c77619e803b trunk

[svn r56] Initial support for TypeInfo. Enums not work. Several other bugfixes.
author lindquist
date Tue, 23 Oct 2007 05:55:12 +0200
parents 35d93ce68cf4
children d9d5d59873d8
rev   line source
lindquist@1 1 module typeinfo;
lindquist@1 2
lindquist@1 3 void main()
lindquist@1 4 {
lindquist@6 5 auto ti = typeid(int);
lindquist@52 6 char[] str = ti.toString();
lindquist@52 7 printf("%.*s\n", str.length, str.ptr);
lindquist@52 8 assert(str == "int");
lindquist@1 9 }