-
Notifications
You must be signed in to change notification settings - Fork 357
Closed
Description
When initializing a Deque from an Array (coming from NSArray), it crashes at runtime with error:
Fatal error: unsupported: file Swift/ArrayBuffer.swift, line 231
Information
- Package version: commit 65a3841
- Platform version: macOS 11.2.1 (20D74)
- Swift version: Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)
Target: x86_64-apple-darwin20.3.0
Checklist
- If possible, I've reproduced the issue using the
mainbranch of this package. - I've searched for existing GitHub issues.
Steps to Reproduce
Crashes at runtime (Deque+RangeReplaceableCollection.swift:144):
let array = NSArray(arrayLiteral: NSString()) as! [NSObject]
let deque = Deque(array)Runs without crashing:
let array = NSArray(arrayLiteral: NSString()) as! [NSObject]
let deque = Deque(Array(array))Expected behavior
The first example above doesn’t crash.
Actual behavior
Only the second example doesn’t crash.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working