Thx, Simen. Unfortunately, this works only for concretet types, but not for type parameters. Example: class Test(A) { A do_nothing(A x) { return x; } } /* WORKS */ Id_Func!int test() { return new Test!(int); } /* Error : undefined identifier A */ Id_Func!A test() { return new Test!(A); }