We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c50280f commit b48eabdCopy full SHA for b48eabd
lib/AST/TypeCheckRequests.cpp
@@ -248,6 +248,10 @@ void IsFinalRequest::cacheResult(bool value) const {
248
auto decl = std::get<0>(getStorage());
249
decl->LazySemanticInfo.isFinalComputed = true;
250
decl->LazySemanticInfo.isFinal = value;
251
+
252
+ // Register Final in attributes, to preserve print order
253
+ if (value && !decl->getAttrs().hasAttribute<FinalAttr>())
254
+ decl->getAttrs().add(new (decl->getASTContext()) FinalAttr(/*Implicit=*/true));
255
}
256
257
//----------------------------------------------------------------------------//
0 commit comments