Consider: struct A { A fun() { return A.init; } } typedef A B; void main() { B b; B c = b.fun(); } The return type of a member of A must be automatically cast to B when used through a typedef. This is in order to allow B support the same methods as A. It is also consistent with typedefs of built-in types.
Dropping typedef, so won't fix.