>> by the fact that I am testing result is the analyzer guessing that I think the result could indeed be nil when it otherwise would think it can't be?
The analyzer does reason like this.
>> Does the analyzer have some smarts in it to assume that new, init, copy, mutableCopy etc are probably not going to be returning nil even though the headers imply that they can and thereby avaoid warnings about such uses?
It's unlikely that it reasons about "probably". It's more likely to be designed to make assumptions that produce the least number of false warnings, across some large body of sample code, and it may take into account which method or method family is involved, and whether there's a code path that acknowledges the possible nil value.
>> I really don't want to have to go through them all unless there is no other way
The point is that there's a genuine bug in this piece of code, at least in a local sense. If you want to fix such bugs, at least you have the compiler (now) telling you where they are.
Personally, I'd fix the problem. Actually, what I'd do (and have done) is go through every init in my code and remove the possibility of it returning nil, except when I really want it to be failable, in which case I added an "outError" parameter to provide an error if it returns nil. (Since I was doing this before nullability annotations were introduced, the extra parameter served to indicate that the init could fail. Whether you do that or not, you should now at least mark the un-failable ones as nonnull.) Then I'd remove all the redundant error testing and handling, and feel like I'd done a good day's work. 🙂
In this particular case, I'd also add an override of init to ValidatedUserInterfaceItem that simply invokes super and tests the result, in order to "erase" the inherited nullability, and declare the init in its header file so this is known to clients of the class.
Of course, you're certainly free to file a bug complaining about the change in compiler behavior. It's possible that the warning wasn't supposed to be added in this scenario.
Also, you're free to suppress the warning if you wish. Look in the build transcript and the error message should show the option for the warning (of the form "-fXXX", and you can specify the opposite ("-fnoXXX") for the project, for specific files or for specific sections of code within the file.