Skip to content

Commit dd80cd0

Browse files
committed
Sema: Remove redundant 'isStatic()' checks
1 parent 4b79360 commit dd80cd0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/Sema/TypeCheckDecl.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2560,8 +2560,8 @@ static void inferDynamic(ASTContext &ctx, ValueDecl *D) {
25602560
if (auto VD = dyn_cast<VarDecl>(D)) {
25612561
auto staticSpelling = VD->getParentPatternBinding()->getStaticSpelling();
25622562

2563-
// The presence of 'static' bocks the inference of 'dynamic'.
2564-
if (VD->isStatic() && staticSpelling == StaticSpellingKind::KeywordStatic)
2563+
// The presence of 'static' blocks the inference of 'dynamic'.
2564+
if (staticSpelling == StaticSpellingKind::KeywordStatic)
25652565
return;
25662566

25672567
if (VD->isLet() && !isNSManaged)
@@ -2577,7 +2577,7 @@ static void inferDynamic(ASTContext &ctx, ValueDecl *D) {
25772577
auto staticSpelling = FD->getStaticSpelling();
25782578

25792579
// The presence of 'static' bocks the inference of 'dynamic'.
2580-
if (FD->isStatic() && staticSpelling == StaticSpellingKind::KeywordStatic)
2580+
if (staticSpelling == StaticSpellingKind::KeywordStatic)
25812581
return;
25822582
}
25832583

0 commit comments

Comments
 (0)