I'm stupid, I totally forgot that there is the `T is A and A is T` trick that allows for exact type equality comparison. I still think it is a pity that the corresponding PR has been declined ([https://github.com/nim-lang/Nim/pull/8612)](https://github.com/nim-lang/Nim/pull/8612\)).
@Stefan_Salewski: The actual background is somewhat involved. In the inheritance library I'm working on, there is a system to automatically perform super/base/parent class initialization. If there is an inheritance chain A => B => C, I have to make sure that when C tries to call its parent constructor, it doesn't accidentally call the constructor of A. This would be possible due to covariance, and result in a bug because B isn't initialized. I'll probably just go for named constructors because it simplifies the problem. I was asking mainly to see what alternatives others use, and the error overload is indeed a nice solution in general.
