<div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif">You issue is more like </div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif"><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,132,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(187,44,162)">func</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"> foo(var bar:</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(112,61,170)">Int</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">) { </span><span style="font-variant-ligatures:no-common-ligatures">// error: Parameters may not have the 'var' specifier</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;min-height:13px"><span style="font-variant-ligatures:no-common-ligatures"> </span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(75,209,87)">
</p><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">}</span></p><div><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div>So yes, `var` is not allow any more. </div><div><br></div><div><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0003-remove-var-parameters.md#removing-var-from-function-parameters">Removing var from Function Parameters (SE-0003)</a></div><div><br></div><div>Zhaoxin </div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 1, 2016 at 6:21 PM, CK TUNG via swift-users <span dir="ltr"><<a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>This error is for Swift 3 Xcode 8 beta 6</div><div><br></div><div><p></p><p></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:#008400"><span style="color:#4f8187">array</span><span style="color:#000000">.forEach {( <span style="color:#bb2ca2;font-family:Menlo;font-size:11px">var</span> a : </span><span style="color:#703daa">AnyObject</span><span style="color:#000000">) -> () </span><span style="color:#bb2ca2">in</span><span style="color:#000000"> </span><span>// error here : Parameters may not have the 'var' specifier</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:#008400"><span style="color:#000000"> </span><span>// modify object here</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>}</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span><br></span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:#bb2ca2"><span>for</span><span style="color:#000000"> </span><span>var</span><span style="color:#000000"> a </span><span>in</span><span style="color:#000000"> </span><span style="color:#4f8187">array</span><span style="color:#000000"> { <span style="color:#008400;font-family:Menlo;font-size:11px">// OK</span></span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:#008400"><span style="color:#000000"> </span><span>// modify object here</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>}</span></p><p></p><p><span><br></span></p><p></p></div></div><br>______________________________<wbr>_________________<br>
swift-users mailing list<br>
<a href="mailto:swift-users@swift.org">swift-users@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-users" rel="noreferrer" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-users</a><br>
<br></blockquote></div><br></div>