[SR-11361] Collection.removeAll(where:) gives "Extra argument 'where' in call" misleading error #53762
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
Environment
Xcode 10.3 (10G8), Swift 5
Additional Detail from JIRA
md5: 8390525a587406723a1779dcdeda1dec
Issue Description:
Given the struct `Product` which is not conformant to `Equatable` or `Hashable`, a comparison between two `Product`s gives the (expected) error message "Binary operator '==' cannot be applied to two 'Product' operands".
However, when doing the same comparison in `Collection.removeAll(where🙂` on an array of `Product`, e.g.:
you get: "Extra argument 'where' in call"
Removing the `where` argument, e.g.:
you get: "Missing argument label 'where:' in call"
Converting the closure to trailing closure syntax, e.g.:
you get: "Cannot convert value of type '(_OptionalNilComparisonType) -> Bool' to expected argument type 'Bool'"
The text was updated successfully, but these errors were encountered: