private bool SetValueInternal(Number? value, bool reformat, bool userModified)
{
bool result = false;
Number? lastValue = this.Value;
if (userModified && lastValue != value)
{
OnUserModifiedValue();
}
if (reformat)
{
this.Value = value;
}
else
{
this.hasValue = (value != null);
if (this.hasValue)
{
this.value = (Number)value;
}
if (this.Value != lastValue)
{
OnPropertyChanged("Value");
}
}
if (userModified && lastValue != value)
{
OnUserChangedValueApplied(this.Value);
}
if (lastValue != this.Value)
{
result = true;
}
return result;
}
Number is our own custom Struct.
If there’s anything else I can provide please let me know. I was unable to reproduce this in a sample project but I could have another attempt. It happens for every build of our main project though.
Our symbolic execution engine is handling the analysis at the method level so having the method code and the stack trace is already very good. We will give you a sign though if something else is needed.
We’re trying to fix this issue this week but we can’t reproduce it with the provided code. Inspecting the provided call stack shows that the path should not be called during analysis of your SetValueInternal function.
Are you sure that you’re looking at the correct file, correct class (in case there are multiple or nested classes in the file) and correct overload?
Provided call stack suggests that some regular (not a nullable?) argument or variable is checked for null/not null value (directly or indirectly).
Later update: Can be related to nullable as well, somehow.