If two types with the same name are defined, sometimes the messages of DMD are a bit strange: - cannot cast A to A - function foo( A ) does not match parameter A. and so on. It would be helpful, if in case of the same name, the types would be given with full qualified names.