Skip to content

Commit 008791f

Browse files
author
David Ungar
committed
Ensure that an accessor can be found from its VarDecl.
1 parent 691b3c6 commit 008791f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/Parse/ParseDecl.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4879,6 +4879,10 @@ Parser::parseDeclVarGetSet(Pattern *pattern, ParseDeclOptions Flags,
48794879
if (!PrimaryVar) {
48804880
fillInAccessorTypeErrors(*this, accessors);
48814881
Decls.append(accessors.Accessors.begin(), accessors.Accessors.end());
4882+
// Preserve the invariaent that accessor an can be found from its
4883+
// VarDecl.
4884+
accessors.record(*this, storage, Invalid, Flags, StaticLoc, Attributes,
4885+
TyLoc, /*indices*/ nullptr, Decls);
48824886
return nullptr;
48834887
}
48844888

0 commit comments

Comments
 (0)