[Scope map] A local property name is in scope within its own accessors.

While the use of a local property from within its own accessors is a
bit dubious, Swift 3 only warned on it, so model the existing lookup
behavior in the scope map.
This commit is contained in:
Doug Gregor
2016-09-14 09:16:23 -07:00
parent 40445be66a
commit ac93c52c96
6 changed files with 62 additions and 63 deletions

View File

@@ -1709,7 +1709,10 @@ public:
void setInitContext(DeclContext *dc) { InitContext = dc; }
/// Retrieve the source range covered by this pattern binding.
SourceRange getSourceRange() const;
///
/// \param omitAccessors Whether the computation should omit the accessors
/// from the source range.
SourceRange getSourceRange(bool omitAccessors = false) const;
};
/// \brief This decl contains a pattern and optional initializer for a set