{"id":119,"date":"2021-09-17T15:23:44","date_gmt":"1970-01-01T00:00:00","guid":{"rendered":"http:\/\/swift.tecc0.com\/?p=119"},"modified":"2021-09-17T15:23:44","modified_gmt":"1970-01-01T00:00:00","slug":"post-119","status":"publish","type":"post","link":"https:\/\/swift.tecc0.com\/?p=119","title":{"rendered":"\u5bfe\u51e6\u6cd5: switch must be exhaustive consider adding a default clause"},"content":{"rendered":"<p>\u3053\u306e\u30a8\u30e9\u30fc\u306f\u3001<span style=\"color: #ff0000;\"><strong>\u300eSwitch\u6587\u306fdefault\u304c\u5fc5\u9808\u3084\u306d\u3093\uff01\u300f<\/strong><\/span>\u3063\u3066\u30a8\u30e9\u30fc\u3067\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<h3>Swift\u3067\u306eSwitch\u6587\u306e\u4f8b<\/h3>\n<pre class=\"toolbar-overlay:false lang:swift decode:true \">let n = 2\r\nswitch n {\r\n    case 0:\r\n        print(0)\r\n    case 1:\r\n        print(1)\r\n    case 1:\r\n        print(2)\r\n    default:\r\n        break\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<p>\u3053\u3093\u306a\u611f\u3058\u3067\u4f55\u3082\u3057\u306a\u3044\u5834\u5408\u306f\u3001break \u66f8\u3044\u3066\u308c\u3070\u304ak\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u306e\u30a8\u30e9\u30fc\u306f\u3001\u300eSwitch\u6587\u306fdefault\u304c\u5fc5\u9808\u3084\u306d\u3093\uff01\u300f\u3063\u3066\u30a8\u30e9\u30fc\u3067\u3059\u3002 &nbsp; Swift\u3067\u306eSwitch\u6587\u306e\u4f8b let n = 2 switch n { case 0: print(0) case 1: &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=\/wp\/v2\/posts\/119"}],"collection":[{"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=119"}],"version-history":[{"count":3,"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=\/wp\/v2\/posts\/119\/revisions"}],"predecessor-version":[{"id":122,"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=\/wp\/v2\/posts\/119\/revisions\/122"}],"wp:attachment":[{"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=119"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=119"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=119"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}