We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
swift-driver version: 1.26.9 Apple Swift version 5.5 (swiftlang-1300.0.31.1 clang-1300.0.29.1) Target: x86_64-apple-macosx11.0
md5: 465e049fde0bdaab0b80c1035988256e
duplicates:
Issue Description:
The following code compiles and causes program to crash:
import Cocoa typealias Thing = String class Item: Equatable { static func ==(lhs: Item, rhs: Item) -> Bool { return true } } final class CustomList { var things: [Thing] required init(things: [Thing]) { self.things = things } } extension Array where Element: Item { func isTop(_ item: Element) -> Bool { guard let topItem = self.last else { return false } return topItem == item } } extension CustomList: RangeReplaceableCollection { public convenience init() { self.init(things: []) } public var startIndex: Int { things.startIndex } public var endIndex: Int { things.endIndex } public subscript(key: Int) -> Thing { get { return things[key] } } public func index(after: Int) -> Int { return things.index(after:after) } func replaceSubrange(_ subrange: Range<Int>, with newElements: [Thing]) { things.replaceSubrange(subrange, with: newElements) } } var list = CustomList() // This yields: illegal hardware instruction swift CollectionError.swift list += CustomList(["thing"])
Swift version:
Context: Swift Forums Post
The text was updated successfully, but these errors were encountered:
This issue is fixed in recent swift snapshots. (Tested on the October 18th snapshot).
Sorry, something went wrong.
No branches or pull requests
Environment
Additional Detail from JIRA
md5: 465e049fde0bdaab0b80c1035988256e
duplicates:
Issue Description:
The following code compiles and causes program to crash:
Swift version:
Context: Swift Forums Post
The text was updated successfully, but these errors were encountered: