<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="">I want to add a method to Dictionary but only if the key is a specific non-protocol type.<div class=""><br class=""></div><div class="">I tried:</div><div class=""><font face="Menlo" style="font-size: 11px;" class="">extension Dictionary where Key == MyStructType</font></div><div class=""><br class=""></div><div class="">This yields “<font face="Menlo" style="font-size: 11px;" class="">error: same-type requirement makes generic parameter 'Key' non-generic</font>”.</div><div class=""><br class=""></div><div class="">Is there a way to do this that doesn’t involve subclassing Dictionary?</div></body></html>