swift icon indicating copy to clipboard operation
swift copied to clipboard

[SR-2490] Bridging from `NSArray` to `[Any]` crashes at runtime

Open jadengeller opened this issue 10 years ago • 4 comments

Previous ID SR-2490
Radar rdar://problem/27905230
Original Reporter @jadengeller
Type Bug
Status Resolved
Resolution Done

Environment

Xcode 8 beta 6, swift 3

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, RunTimeCrash
Assignee @jadengeller
Priority Medium

md5: a022bdc967703b61fbdc440504f7d993

Issue Description:

`[] as NSArray as! [Any] // crashes
`[] as NSArray as! [AnyObject] as [Any] // no problem

jadengeller avatar Aug 26 '16 01:08 jadengeller

I thought @rjmccall just fixed this, but it seems to still be reproducing for me.

belkadan avatar Aug 26 '16 19:08 belkadan

I just tried it with ToT, and it's working for me. What version were you using, @belkadan?

jckarter avatar Aug 30 '16 17:08 jckarter

Nm, I was testing the wrong thing. Trying a fix now: https://github.com/apple/swift/pull/4664

jckarter avatar Sep 07 '16 19:09 jckarter

Merged into 3.0 branch as https://github.com/apple/swift/pull/4666. This won't make it into 3.0 GM but should be in future snapshots and betas.

jckarter avatar Sep 09 '16 20:09 jckarter