swift
5bbd1261 - Redo The Notes For "Uninhabited" Parameter Types

Commit
4 years ago
Redo The Notes For "Uninhabited" Parameter Types The use of the term 'uninhabited' does not make sense outside of formal type theoretic contexts. In Swift, we also do not use this term in a standard way - hence the term "structurally uninhabited" since we only consider products and sums eligible for the check. (Aside: We do not do exponentials because... well, Swift's type system implements Harper's "typerec" operator and as a consequence parametricity is just _not a thing_). I digress... So, improve upon the old diagnostic in two ways: 1) Do away with 'uninhabited' - instead, mention that it's either an enum or a tuple with an enum in it that 'has no cases' 2) Since the SIL parameter convention flattens all tuples, point directly at the offending uninhabited element type rdar://83600669
Author
Committer
Parents
Loading