You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
extensionSet {
funcoverlapCount(_lhs: [Int], _rhs: [Int]) -> Int {
Set(lhs).intersection(rhs).count// error: type of expression is ambiguous without more context
}
}
We should infer that T == Int here. If that's not possible, we should at least provide a more precise diagnostic.
The text was updated successfully, but these errors were encountered:
Unfortunately this is existing behavior which we can't change due to source compatibility reasons. Usage of `Set` in extension of `Set` means that generic arguments are equated unless parameters are explicitly specified.
I don't really see how we could detect this in the constraint system since type variables would just get passed down to the references of Set, we can't allocate a fix per use...
Additional Detail from JIRA
md5: 5de0728de90f586ca372a09a1e33b463
Issue Description:
https://twitter.com/wilshipley/status/1332934549223862273
We should infer that
T == Int
here. If that's not possible, we should at least provide a more precise diagnostic.The text was updated successfully, but these errors were encountered: