Repository: dotnet/roslyn
File: src/Compilers/CSharp/Portable/Binder/DecisionDagBuilder.cs (C#)

Code before:
                    if (!tests2.IsEmpty)
                    {
                        throw ExceptionUtilities.Unreachable();
                    }

                    tests1.Free();
                    tests2.Free();

                    return true;

                    static bool? equalsEasyOut(SequenceTests sequence, object? obj)
                    {
                        if (sequence == obj)
                        {
                            return true;
                        }

                        if (obj is not SequenceTests other || sequence.GetType() != other.GetType() || sequence.RemainingTests.Length != other.RemainingTests.Length)
                        {
                            return false;
                        }

                        if (!sequence.RemainingTests.Any(t => t is SequenceTests))
                        {
                            return sequence.RemainingTests.SequenceEqual(other.RemainingTests);
                        }

                        return null;
                    }
                }

                public sealed override int GetHashCode()
                {
                    int? easyOut = getHashCodeEasyOut(this);

                    if (easyOut.HasValue)
                    {
                        return easyOut.GetValueOrDefault();
                    }

                    int value = Hash.Combine(this.RemainingTests.Length, this.GetType().GetHashCode());
                    var tests = ArrayBuilder<Tests>.GetInstance();
                    tests.AddRange(this.RemainingTests);

                    do
                    {
                        var t = tests.Pop();

                        if (t is SequenceTests sequence)
                        {
                            easyOut = getHashCodeEasyOut(sequence);

Review comment (suggestion):
Is there any chance that there will be nested sequences in an individual remaining test? And if so, is that something we want to handle? If the answer to either question is no, consider leaving a comment to explain. #Resolved

Code after:

                    if (!tests2.IsEmpty)
                    {
                        throw ExceptionUtilities.Unreachable();
                    }

                    tests1.Free();
                    tests2.Free();

                    return true;

                    static bool? equalsEasyOut(SequenceTests sequence, object? obj)
                    {
                        if (sequence == obj)
                        {
                            return true;
                        }

                        if (obj is not SequenceTests other || sequence.GetType() != other.GetType() || sequence.RemainingTests.Length != other.RemainingTests.Length)
                        {
                            return false;
                        }

                        if (!sequence.RemainingTests.Any(t => t is SequenceTests))
                        {
                            return sequence.RemainingTests.SequenceEqual(other.RemainingTests);
                        }

                        return null;
                    }
                }

                public sealed override int GetHashCode()
                {
                    int? easyOut = getHashCodeEasyOut(this);

                    if (easyOut.HasValue)
                    {
                        return easyOut.GetValueOrDefault();
                    }

                    int value = Hash.Combine(this.RemainingTests.Length, this.GetType().GetHashCode());
                    var tests = ArrayBuilder<Tests>.GetInstance();
                    tests.AddRange(this.RemainingTests);

                    do
                    {
                        var t = tests.Pop();

                        if (t is SequenceTests sequence)
                        {