{"id":2300,"date":"2018-10-31T10:50:28","date_gmt":"2018-10-31T10:50:28","guid":{"rendered":"https:\/\/andyjohnson.uk\/?p=2300"},"modified":"2018-10-31T10:50:28","modified_gmt":"2018-10-31T10:50:28","slug":"unreachable","status":"publish","type":"post","link":"https:\/\/andyjohnson.uk\/blog\/2018\/10\/31\/unreachable\/","title":{"rendered":"Unreachable"},"content":{"rendered":"<pre>\/\/ TODO: Requires testing on staging env. ** Do not run on production ** \npublic bool Validate(Terms brexit)\n{\n    if (this.EU.Commission.Approves(brexit))\n    {\n        if (this.EU.Countries.All(country =&gt; country.Approves(brexit))\n        {\n            if (this.EU.Parliament.Approves(brexit))\n            {\n                if (this.UK.ConservativeParty.Approves(brexit))\n                {\n                    if (this.UK.Parliament.Approves(brexit))\n                    {\n                        return true;  \/\/ TODO: Gives \"unreachable code\" error!!??\n                    }\n                }\n            }\n        }\n    }\n\n    throw new HardBrexitException(\"No deal\", brexit);  \/\/ Fallthrough\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\/\/ 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 =&gt; 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 &#8220;unreachable code&#8221; error!!?? } } } } } throw new HardBrexitException(&#8220;No deal&#8221;, brexit); \/\/ &hellip; <a href=\"https:\/\/andyjohnson.uk\/blog\/2018\/10\/31\/unreachable\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Unreachable&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[19],"class_list":["post-2300","post","type-post","status-publish","format-standard","hentry","category-politics","tag-brexit"],"_links":{"self":[{"href":"https:\/\/andyjohnson.uk\/blog\/wp-json\/wp\/v2\/posts\/2300","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/andyjohnson.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/andyjohnson.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/andyjohnson.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/andyjohnson.uk\/blog\/wp-json\/wp\/v2\/comments?post=2300"}],"version-history":[{"count":0,"href":"https:\/\/andyjohnson.uk\/blog\/wp-json\/wp\/v2\/posts\/2300\/revisions"}],"wp:attachment":[{"href":"https:\/\/andyjohnson.uk\/blog\/wp-json\/wp\/v2\/media?parent=2300"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/andyjohnson.uk\/blog\/wp-json\/wp\/v2\/categories?post=2300"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/andyjohnson.uk\/blog\/wp-json\/wp\/v2\/tags?post=2300"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}