I may not understand the intended purpose of this feature. Given the following class:
Codepublic class SomeClass
{
public SomeClass()
{
IsNeverNull = new SomeOtherClass();
}
public SomeOtherClass IsNeverNull { get; private set; }
}
…I would not expect the null analysis to flag a use of IsNeverNull as a possible null (which it does), since if you have a SomeClass, you are guaranteed to have a SomeOtherClass… unless
a) That's not what null analysis does, or
b) I have made a mistake somewhere ;)
Hi Michael,
Thank you for the code snippet. I have reproduced the issue and we are working on it.