Skip to content

Commit

Permalink
Fix inconsistent use of 'new' keyword in Deconstruct methods
Browse files Browse the repository at this point in the history
Removed unnecessary use of 'new' in one Deconstruct method and added it to another for consistency with inheritance behavior. This ensures clarity in method overriding and alignment with expected functionality.
  • Loading branch information
louthy committed Feb 1, 2025
1 parent a710b76 commit e6475ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions LanguageExt.Core/Immutable Collections/Iterator/Iterator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public Iterable<A> AsIterable() =>
/// <summary>
/// Deconstructor
/// </summary>
public new void Deconstruct(out A head, out Iterator<A> tail)
public void Deconstruct(out A head, out Iterator<A> tail)
{
head = Head;
tail = Tail;
Expand Down Expand Up @@ -560,7 +560,7 @@ public override void Dispose()
/// </summary>
public abstract class Cons : Iterator<A>
{
public void Deconstruct(out A head, out Iterator<A> tail)
public new void Deconstruct(out A head, out Iterator<A> tail)
{
head = Head;
tail = Tail;
Expand Down

0 comments on commit e6475ea

Please sign in to comment.