[SE-0400] All properties with init accessors become part of the memberwise init

Per the clarification during the review thread, all properties with
init accessors (including those that do not initialize any underlying
storage) are part of the memberwise initializer.
This commit is contained in:
Doug Gregor
2023-06-27 17:28:53 -07:00
parent bd11fceff5
commit fe2dec5ee5
5 changed files with 6 additions and 9 deletions

View File

@@ -1300,10 +1300,6 @@ HasMemberwiseInitRequest::evaluate(Evaluator &evaluator,
if (!var->isMemberwiseInitialized(/*preferDeclaredProperties=*/true))
continue;
// If init accessors are not involved, we are done.
if (initializedViaAccessor.empty())
return true;
// Check whether use of init accessors results in access to uninitialized
// properties.