<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="">Hi,<div class=""><br class=""></div><div class="">This extension on Array works as expected:<br class=""><div class=""><br class=""></div><div class=""><div style="margin: 0px; line-height: normal;" class=""><font face="Monaco" class="">extension Array where Element: CustomStringConvertible {</font></div><div style="margin: 0px; line-height: normal;" class=""><font face="Monaco" class=""> func f(_ x: Element) -> String {</font></div><div style="margin: 0px; line-height: normal;" class=""><font face="Monaco" class=""> return x.description</font></div><div style="margin: 0px; line-height: normal;" class=""><font face="Monaco" class=""> }</font></div><div style="margin: 0px; line-height: normal;" class=""><font face="Monaco" class="">}</font></div></div><div style="margin: 0px; line-height: normal;" class=""><br class=""></div><div style="margin: 0px; line-height: normal;" class="">But when I use Iterator.Element instead, I get an error message (<span style="color: rgb(242, 0, 4); font-family: Monaco;" class="">error: value of type 'Element' has no member 'description'</span>):</div><div style="margin: 0px; line-height: normal;" class=""><br class=""></div><div style="margin: 0px; line-height: normal;" class=""><div style="margin: 0px; line-height: normal;" class=""><font face="Monaco" class="">extension Array where Iterator.Element: CustomStringConvertible {</font></div><div style="margin: 0px; line-height: normal;" class=""><font face="Monaco" class=""> func f(_ x: Iterator.Element) -> String {</font></div><div style="margin: 0px; line-height: normal;" class=""><font face="Monaco" class=""> return x.description</font></div><div style="margin: 0px; line-height: normal;" class=""><font face="Monaco" class=""> }</font></div><div style="margin: 0px; line-height: normal;" class=""><font face="Monaco" class="">}</font></div><div style="margin: 0px; line-height: normal;" class=""><br class=""></div><div style="margin: 0px; line-height: normal;" class="">I assume this is a type checker bug, but before I report it, I wanted to make sure that that’s really the case. Or is there a difference between Element and</div><div style="margin: 0px; line-height: normal;" class="">Iterator.Element?</div><div style="margin: 0px; line-height: normal;" class=""><br class=""></div><div style="margin: 0px; line-height: normal;" class="">Thanks and best regards,</div><div style="margin: 0px; line-height: normal;" class="">Toni</div></div></div></body></html>