mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #23932 from xymus/IsFinalRequest
Sema: implement `isFinal` using a request evaluator
This commit is contained in:
@@ -2751,6 +2751,11 @@ void Serializer::writeDecl(const Decl *D) {
|
||||
writeDeclAttribute(Attr);
|
||||
}
|
||||
|
||||
if (auto VD = dyn_cast<ValueDecl>(D)) {
|
||||
if (VD->isFinal() && !D->getAttrs().hasAttribute<FinalAttr>())
|
||||
writeDeclAttribute(new (D->getASTContext()) FinalAttr(/*Implicit=*/false));
|
||||
}
|
||||
|
||||
if (auto *value = dyn_cast<ValueDecl>(D)) {
|
||||
auto *storage = dyn_cast<AbstractStorageDecl>(value);
|
||||
auto access = value->getFormalAccess();
|
||||
|
||||
Reference in New Issue
Block a user