import std.stdio; class A { int a; } class B { int b; } void main() { int n; Object a = new A; Object b = new B; writefln("%s %s %s", typeof(n).stringof, typeof(a).stringof, typeof(b).stringof); } prints int Object, Object. This seems somewhat counter-intuitive for an object oriented language!