Is it possible to constrain two generic parameters associated types in a function to each other?
I'm trying to do something like this:
protocol One {
associatedtype first: Two
}
protocol Two {
associatedtype second: One
}
func f<O: One, T: Two>(o: O) -> T where O.first == T, T.second == O {
fatalError()
}
It fails with the errors:
'first' is not a member type of 'O'
'second' is not a member type of 'T'