0

Unreachable

// TODO: Requires testing on staging env. ** Do not run on production ** 
public bool Validate(Terms brexit)
{
    if (this.EU.Commission.Approves(brexit))
    {
        if (this.EU.Countries.All(country => country.Approves(brexit))
        {
            if (this.EU.Parliament.Approves(brexit))
            {
                if (this.UK.ConservativeParty.Approves(brexit))
                {
                    if (this.UK.Parliament.Approves(brexit))
                    {
                        return true;  // TODO: Gives "unreachable code" error!!??
                    }
                }
            }
        }
    }

    throw new HardBrexitException("No deal", brexit);  // Fallthrough
}

andy

Leave a Reply

Your e-mail address will not be published. Required fields are marked *