class Foo { public void do_foo () { assert (this is Foo); } } void main() { var foo = new Foo (); foo.do_foo (); }