Skip to content

Commit e18a49a

Browse files
committed
[AST] Remove old code in emitLetToVarNoteIfSimple() that prevented the fix-it from being applied in some cases
1 parent 37b4020 commit e18a49a

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

lib/AST/Decl.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5632,12 +5632,6 @@ void VarDecl::emitLetToVarNoteIfSimple(DeclContext *UseDC) const {
56325632
if (auto AD = dyn_cast<AccessorDecl>(FD)) {
56335633
if (AD->isGetter() && !AD->getAccessorKeywordLoc().isValid())
56345634
return;
5635-
5636-
auto accessorDC = AD->getDeclContext();
5637-
// Do not suggest the fix-it if `Self` is a class type.
5638-
if (accessorDC->isTypeContext() && !accessorDC->hasValueSemantics()) {
5639-
return;
5640-
}
56415635
}
56425636

56435637
auto &d = getASTContext().Diags;

0 commit comments

Comments
 (0)