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:
Kavon Farvardin
2022-01-26 17:44:29 -07:00
parent a60da756cf
commit 057e69668a
4 changed files with 6 additions and 18 deletions

View File

@@ -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()) {