Skip to content

Commit

Permalink
🐛 Fix build error for legacy and nullable subjects
Browse files Browse the repository at this point in the history
When copying the implementation from System.Reactive, we improperly brought HasObservers as an override, but it should be just virtual, since we don't have a SubjectBase class.
  • Loading branch information
kzu committed Sep 22, 2021
1 parent 8cd6f92 commit d9e738b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/RxFree/build/Legacy/Subject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ internal class Subject<T> : IObserver<T>, IObservable<T>, IDisposable
/// <summary>
/// Indicates whether the subject has observers subscribed to it.
/// </summary>
public override bool HasObservers => Volatile.Read(ref observers).Length != 0;
public virtual bool HasObservers => Volatile.Read(ref observers).Length != 0;

/// <summary>
/// Indicates whether the subject has been disposed.
Expand Down
2 changes: 1 addition & 1 deletion src/RxFree/build/Nullable/Subject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ internal class Subject<T> : IObserver<T>, IObservable<T>, IDisposable
/// <summary>
/// Indicates whether the subject has observers subscribed to it.
/// </summary>
public override bool HasObservers => Volatile.Read(ref observers).Length != 0;
public virtual bool HasObservers => Volatile.Read(ref observers).Length != 0;

/// <summary>
/// Indicates whether the subject has been disposed.
Expand Down

0 comments on commit d9e738b

Please sign in to comment.