Matching behavior with expectations for associated types and typealiases in constrained protocol extensions

Fun fact:

If you change the extension from this:

extension P where Self: BinaryFloatingPoint {
  typealias A = Float
}

to this:

extension BinaryFloatingPoint where Self: P {
  typealias A = Float
}

Then the example in the original post compiles as written and prints:

Float
Bool
Float
Bool
6 Likes