<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 class="">Closures are a valid argument to pass to a subscript. Granted, I’m not sure of a use-case, but it’s certainly something that is possible.</div><br class=""><div><blockquote type="cite" class=""><div class="">On Jun 20, 2016, at 5:54 PM, Dany St-Amant <<a href="mailto:dsa.mls@icloud.com" class="">dsa.mls@icloud.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="content-type" content="text/html; charset=utf-8" class=""><div dir="auto" class=""><div class=""><span class=""></span></div><div class=""><meta http-equiv="content-type" content="text/html; charset=utf-8" class=""><div class=""><br class=""></div><div class="">Le 20 juin 2016 à 14:10, Robert Widmann via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> a écrit :<br class=""><br class=""></div><blockquote type="cite" class=""><p class="" style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 14px;">This change will modify and add the following productions in the Swift grammar</p><div class="highlight highlight-source-diff" style="box-sizing: border-box; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 14px; overflow: visible !important;"><pre class="" style="box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 11.899999618530273px; margin-top: 0px; margin-bottom: 0px; line-height: 1.45; word-wrap: normal; padding: 16px; overflow: auto; background-color: rgb(247, 247, 247); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; word-break: normal;">GRAMMAR OF A SUBSCRIPT DECLARATION
subscript-declaration → subscript-head subscript-result code-block
subscript-declaration → subscript-head subscript-result getter-setter-block
subscript-declaration → subscript-head subscript-result getter-setter-keyword-block
<span class="pl-md" style="box-sizing: border-box; background-color: rgb(255, 236, 236); color: rgb(189, 44, 0);">-subscript-head → attributes(opt) declaration-modifiers(opt) subscript parameter-clause</span>
<span class="pl-mi1" style="box-sizing: border-box; background-color: rgb(234, 255, 234); color: rgb(85, 165, 50);">+subscript-head → attributes(opt) declaration-modifiers(opt) generic-parameter-clause(opt) subscript parameter-clause</span>
<span class="pl-mi1" style="box-sizing: border-box; background-color: rgb(234, 255, 234); color: rgb(85, 165, 50);">+subscript-result → -> attributes(opt) throws(opt) type</span>
<span class="pl-mi1" style="box-sizing: border-box; background-color: rgb(234, 255, 234); color: rgb(85, 165, 50);">+subscript-result → -> attributes(opt) rethrows(opt) type</span></pre></div></blockquote>I am no expert in throws, but since there's no closure involved I think that 'rethrows' doesn't apply here.<div class=""><br class=""></div><div class="">Dany</div></div></div></div></blockquote></div><br class=""></body></html>