Skip to content

Commit 92a038c

Browse files
committed
[CodeCompletion] Strengthen null check to assert NFC
This function is only called with a non-null type, which is the only reasonable way to call it anyway.
1 parent 812d156 commit 92a038c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/IDE/CodeCompletion.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3843,8 +3843,7 @@ class CompletionOverrideLookup : public swift::VisibleDeclConsumer {
38433843
if (hasFuncIntroducer || hasVarIntroducer || isKeywordSpecified("override"))
38443844
return;
38453845

3846-
if (!CurrTy)
3847-
return;
3846+
assert(CurrTy);
38483847
const auto *CD = dyn_cast_or_null<ClassDecl>(CurrTy->getAnyNominal());
38493848
if (!CD)
38503849
return;

0 commit comments

Comments
 (0)