Skip to content

Commit 903ba26

Browse files
committed
Sema: Fix a warning
1 parent 047f9e8 commit 903ba26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Sema/TypeCheckDecl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7733,7 +7733,7 @@ void TypeChecker::validateDecl(ValueDecl *D) {
77337733
}
77347734

77357735
// Member subscripts need some special validation logic.
7736-
if (auto nominalDecl = dc->getAsNominalTypeOrNominalTypeExtensionContext()) {
7736+
if (dc->isTypeContext()) {
77377737
// If this is a class member, mark it final if the class is final.
77387738
inferFinalAndDiagnoseIfNeeded(*this, SD, StaticSpellingKind::None);
77397739

0 commit comments

Comments
 (0)