-
-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug 🐞
Having an IObservable<EventSpeaker> CurrentSpeaker observable to which i subscribe like this:
CurrentSpeaker
.ToProperty(this, x => x.CurrentSpeaker, out _currentSpeakerHelper)
.DisposeWith(_compositeDisposable);
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:
public global::EventSpeaker CurrentSpeaker { get => _currentSpeaker = (_currentSpeakerHelper?.Value ?? _currentSpeaker); }
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working