<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Another problem about sub-typing system in Swift is tuple.<div class=""><br class=""></div><div class="">Why tuple does not support sub-typing feature?</div><div class=""><br class=""></div><div class="">for example:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Fira Code'; color: rgb(4, 51, 255);" class="">class<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> A{</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Fira Code'; min-height: 13px;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Fira Code';" class="">}</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Fira Code'; min-height: 13px;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Fira Code';" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff" class="">class</span> B:<span style="font-variant-ligatures: no-common-ligatures; color: #3495af" class="">A</span> {</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Fira Code'; min-height: 13px;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Fira Code';" class="">}</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Fira Code'; min-height: 13px;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Fira Code';" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff" class="">let</span> tupleB:(<span style="font-variant-ligatures: no-common-ligatures; color: #3495af" class="">B</span>,<span style="font-variant-ligatures: no-common-ligatures; color: #3495af" class="">B</span>) = (<span style="font-variant-ligatures: no-common-ligatures; color: #3495af" class="">B</span>(),<span style="font-variant-ligatures: no-common-ligatures; color: #3495af" class="">B</span>())</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Fira Code';" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #0433ff" class="">let</span> tupleA:(<span style="font-variant-ligatures: no-common-ligatures; color: #3495af" class="">A</span>,<span style="font-variant-ligatures: no-common-ligatures; color: #3495af" class="">A</span>) = <span style="font-variant-ligatures: no-common-ligatures; color: #3495af" class="">tupleB</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Fira Code'; min-height: 13px;" class=""><br class=""></div></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Fira Code';" class=""><div style="font-family: Helvetica; font-size: 12px;" class=""><br class=""></div><div style="font-family: Helvetica; font-size: 12px;" class="">This should be allowed in Swift. But a compiler typing-check error.</div><div style="font-family: Helvetica; font-size: 12px;" class=""><br class=""></div><div style="font-family: Helvetica; font-size: 12px;" class="">Thanks!</div><div style="font-family: Helvetica; font-size: 12px;" class=""><br class=""></div><div style="font-family: Helvetica; font-size: 12px;" class=""><br class=""></div></div></body></html>