SR-1534 Error: Call is to rethrows function, but a defaulted argument function can throw
Issue Description:
funcf<Target: Comparable>(_a: Target, _b: Target, areInIncreasingOrder: (Target, Target) throws -> Bool = (<)) rethrows -> Bool {
tryareInIncreasingOrder(a, b)
}
#warning("Compiler bug: compiler think this is throws but it's not")
f(1, 2) // !! Call can throw but is not marked with 'try'
mattyoung commentedFeb 12, 2022
Environment
Xcode Version 13.3 beta 2 (13E5095k)
Additional Detail from JIRA
md5: 4c20bc25d194caaf0caaa25c7402115b
duplicates:
Issue Description:
see: https://forums.swift.org/t/how-to-give-the-last-parameter-its-default-to-operator-func-f-target-comparable-a-target-b-target-areinincreasingorder-target-target-throws-bool-target-rethrows/44967/2
The text was updated successfully, but these errors were encountered: