<div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif">Implicit converting to `Any` or `AnyObject` is not allowed in Swift 3. You have to do `as Any` or `as AnyObject` or as you did, `as NSNumber) yourself.</div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif">I suggest you read the change log. It really helps a lot.</div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif">Zhaoxin</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Dec 3, 2016 at 2:36 AM, Adrian Zubarev 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 style="word-wrap:break-word"><div class="m_-3316057883799428325bloop_markdown"><p>Can you provide more details like what type all of these instances have. It’s hard to follow what exactly you’re doing there.</p><span class="HOEnZb"><font color="#888888">
<p></p></font></span></div><div class="m_-3316057883799428325bloop_original_html"><span class="HOEnZb"><font color="#888888"><div id="m_-3316057883799428325bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br></div> <br> <div id="m_-3316057883799428325bloop_sign_1480703758223560960" class="m_-3316057883799428325bloop_sign"><div style="font-family:helvetica,arial;font-size:13px">-- <br>Adrian Zubarev<br>Sent with Airmail</div></div></font></span><div><div class="h5"> <br><p class="m_-3316057883799428325airmail_on">Am 2. Dezember 2016 um 19:28:20, Maury Markowitz via swift-users (<a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a>) schrieb:</p> <blockquote type="cite" class="m_-3316057883799428325clean_bq"><span><div><div></div><div>Check out this line of code:<br><br>if parts[2].characters.count > 0 { data["I3"] = Int(parts[2]) }<br><br>This worked fine in 2.x, but in 3.0 it complains:<br><br>Cannot subscript a value of type 'inout [String]' (aka 'inout Array<String>')<br><br>It took me a *long* time before I consider that the error was incorrect and found this trivial solution:<br><br>if c > 0 && parts[0].characters.count > 0 { data["I1"] = Int(parts[0]) as NSNumber? }<br><br>So, is this a "bug"? The error has nothing to do with indexing, it seems. But maybe I'm wrong?<br>______________________________<wbr>_________________<br>swift-users mailing list<br><a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a><br><a href="https://lists.swift.org/mailman/listinfo/swift-users" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-users</a><br></div></div></span></blockquote></div></div></div><div class="m_-3316057883799428325bloop_markdown"><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>