swift
feba5474 - AST: Adopt `Decl::isUnreachableAtRuntime()` in Hashable/Equatable derivation.

Commit
1 year ago
AST: Adopt `Decl::isUnreachableAtRuntime()` in Hashable/Equatable derivation. When deriving `Hashable` and `Equatable` for enums, use `Decl::isUnreachableAtRuntime()` to determine whether or not to insert `_diagnoseUnavailableCodeReached()` traps for specific enum elements. This fixes a bug where inappropriate traps were inserted for enum elements that are unavailable for app extensions. It also fixes a bug where traps were inserted when building a zippered library for macOS and enum elements were unavailable on macOS but not for macCatalyst clients. Resolves rdar://125371621
Author
Committer
Parents
Loading