mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
The cached values for `hasOnlyCasesWithoutAssociatedValues()` and `hasPotentiallyUnavailableCaseValue()` are computed in a single pass over the elements of an `EnumDecl`. However, the pass would return early after finding an element with an associated value, without checking whether any of the rest of the elements were potentially unavailable. This made `Comparable` synthesis succeed for any enum with potentially unavailable elements so long as the first element in the enum has an associated value.