mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Fix for rdar://19614869, Fuzzing Swift: AnnotAndDiagASTConsumer crashes in SemaAnnotator::walkToDeclPost(...): Assertion failed: "lazy var not implicitly computed"
Minor: modified assertion to handle invalid getters. Swift SVN r24896
This commit is contained in:
@@ -133,7 +133,8 @@ bool SemaAnnotator::walkToDeclPost(Decl *D) {
|
||||
if (auto *VD = PBD->getSingleVar()) {
|
||||
if (VD->getAttrs().hasAttribute<LazyAttr>()) {
|
||||
if (auto *Get = VD->getGetter()) {
|
||||
assert(Get->isImplicit() && "lazy var not implicitly computed");
|
||||
assert((Get->isImplicit() || Get->isInvalid())
|
||||
&& "lazy var getter must be either implicitly computed or invalid");
|
||||
|
||||
// Note that an implicit getter may not have the body synthesized
|
||||
// in case the owning PatternBindingDecl is invalid.
|
||||
|
||||
Reference in New Issue
Block a user