<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="">struct Object {</div><div class="">let identifier: String</div><div class="">}</div><div class=""><br class=""></div><div class="">struct User: Object {</div><div class=""><br class=""></div><div class="">}</div><div class=""><br class=""></div><div class="">struct Tree: Object {</div><div class="">}</div><div class=""><br class=""></div><div class="">The last two structs get the identifier property "mixed" in but are unique types :)</div></div></div></blockquote></div><br class=""><div class="">Is unique meant so that User-Objects can't be used as "Object"-Object parameters?</div><div class="">I'm asking because this might be the biggest source of confusion with struct inheritance:</div><div class="">As the two "child-structs" don't add new data to their parent, they would (technically) be compatible — but this is fragile, so it might be preferable to "hide" polymorphism by default, and maybe add an annotation to explicitly allow that a sub-struct can be used as its parent type.</div><div class="">@compatible(Float) struct SpecialFloat: Float...</div><div class=""><br class=""></div></body></html>