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
try
Xcode 9.3(9E145), Swift 4.1
md5: 9baa80becbe1a0f0644b8faec334d7eb
duplicates:
Issue Description:
I'm implementing simple quicksort function like below.
import Foundation extension Array where Element: Comparable { func quicksorted(by areInIncreasingOrder: (Element, Element) throws -> Bool = (<)) rethrows -> Array { guard let pivot = self.first else { return self } let rest = self.dropFirst() return try rest.filter { try areInIncreasingOrder($0, pivot) }.quicksorted(by: areInIncreasingOrder) + [pivot] + rest.filter { try !areInIncreasingOrder($0, pivot) }.quicksorted(by: areInIncreasingOrder) } } let arr = [5,2,5,7,4,8,0,6,4,1,2,3,3,6,3] print(arr.quicksorted())
This code causes compiler error that says "Call can throw but is not marked with 'try'" even that the operator `<` is not a throwing function.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Environment
Xcode 9.3(9E145), Swift 4.1
Additional Detail from JIRA
md5: 9baa80becbe1a0f0644b8faec334d7eb
duplicates:
Issue Description:
I'm implementing simple quicksort function like below.
This code causes compiler error that says "Call can throw but is not marked with 'try'" even that the operator `<` is not a throwing function.
The text was updated successfully, but these errors were encountered: