mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
replace NominalTypeDecl::isValueType with a direct struct test
enums don't and will never have stored properties, so just be direct.
This commit is contained in:
@@ -3538,14 +3538,6 @@ public:
|
||||
/// Whether this nominal type qualifies as any actor (plain or distributed).
|
||||
bool isAnyActor() const;
|
||||
|
||||
/// Whether this nominal type corresponds to a language-level value type
|
||||
/// (i.e., structs and enums), meaning that a shallow copy is created when
|
||||
/// reassigning an instance member of the type. That is in contrast with
|
||||
/// reference types like classes and actors, where such mutations are
|
||||
/// reflected for all instance holders. A protocol is not considered a
|
||||
/// value type, even though their conformers might be a value type.
|
||||
bool isValueType() const;
|
||||
|
||||
/// Return the range of semantics attributes attached to this NominalTypeDecl.
|
||||
auto getSemanticsAttrs() const
|
||||
-> decltype(getAttrs().getSemanticsAttrs()) {
|
||||
|
||||
Reference in New Issue
Block a user