Open Geccoka opened 4 days ago
Thank you for this, the intended was to catch the point when _currentSpeakerHelper was null and return the default value, otherwise return the _currentSpeakerHelper.Value, I will update the code to achieve the desired operation as this is also the intended way originally intended.
Describe the bug 🐞
Having an
IObservable<EventSpeaker> CurrentSpeaker
observable to which i subscribe like this:After a speaker has spoken this observable will send a NULL value to its subscribers.
I am migrating away from Fody to the new source generators, and have an issue with this use case. The generated code for the
CurrentSpeaker
is:The problem is that the _currentSpeakerHelper.Value is null and the _currentSpeaker contains the previous value and because of the ?? operator the previous value will be provided and not the null.
This issue was introduced in #28 i think.
Expected behavior
The null value should be set for the generated property.