mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #14945 from jrose-apple/frozen-enums
Implementation for /most/ of SE-0192 (frozen and non-frozen enums)
This commit is contained in:
@@ -3224,6 +3224,13 @@ public:
|
||||
bool isIndirect() const {
|
||||
return getAttrs().hasAttribute<IndirectAttr>();
|
||||
}
|
||||
|
||||
/// True if the enum can be exhaustively switched within \p useDC.
|
||||
///
|
||||
/// Note that this property is \e not necessarily true for all children of
|
||||
/// \p useDC. In particular, an inlinable function does not get to switch
|
||||
/// exhaustively over a non-exhaustive enum declared in the same module.
|
||||
bool isExhaustive(const DeclContext *useDC) const;
|
||||
};
|
||||
|
||||
/// StructDecl - This is the declaration of a struct, for example:
|
||||
|
||||
Reference in New Issue
Block a user