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
Member operators of concrete nominal types must declare at least
one parameter with that type, like
```
struct S {
static func +(lhs: S, rhs: Int) -> S {}
}
```
For protocol member operators, we would look for a parameter of type
`Self`, or an existential type `any P`. While the latter was
consistent with the concrete nominal type case, it was actually
wrong because then the resulting interface type does not give the
type checker any way to bind the `Self` type parameter.
There were two existing test cases that now produce errors, which I
believe is now correct. While this is technically a source break,
because these bogus operators seemingly cannot be witnessed or called,
such a protocol probably had no conforming types.
Fixes#73201.
0 commit comments