Compile-time check for inheritance is actually accurate