ReSharper
 
Get ReSharper
Get your hands on the new features ahead of the release by joining the Early Access Program for ReSharper 2025.1! Learn more

Code inspection: Possible infinite inheritance

Last modified: 11 February 2024

In a situation similar to the following:

You effectively end up with the type A<T> that inherits an infinitely recursive type B. As a result, your assembly will compile, but you will be unable to execute it. If you try, you will get an error message similar to the following: