mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Don't walk into an as-of-yet-unsynthesized function body.
...and don't dump it, and don't force it just to see if an accessor is present. Swift SVN r15830
This commit is contained in:
@@ -3233,8 +3233,8 @@ public:
|
||||
/// have a body for this function.
|
||||
///
|
||||
/// \sa hasBody()
|
||||
BraceStmt *getBody() const {
|
||||
if (getBodyKind() == BodyKind::Synthesize) {
|
||||
BraceStmt *getBody(bool canSynthesize = true) const {
|
||||
if (canSynthesize && getBodyKind() == BodyKind::Synthesize) {
|
||||
const_cast<AbstractFunctionDecl *>(this)->setBodyKind(BodyKind::None);
|
||||
(*Synthesizer)(const_cast<AbstractFunctionDecl *>(this));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user