SE-0215 - Conform Never to Equatable and Hashable

Gotcha, yeah. I think a good way to summarize the design problem is that in order to be a true bottom type Never must be a subtype of all types including existentials of protocols which place requirements on the metatype. The options appear to be:

  1. Make an exception for Never in the subtyping rules for existentials.
  2. Synthesize trapping implementations on Never for all static and initializer requirements of all protocols as well as a type alias equal to Never for all associated type requirements on all protocols.
  3. Don't make Never a true bottom type.

#1 seems like the least bad option to me right now but there could well be edge cases I haven't thought of. #2 is obviously what I am arguing against. :slight_smile:

1 Like