Skip to content

Commit 6c2d511

Browse files
committed
IDE: Replace some dead code with an assert
1 parent 0cc9f6c commit 6c2d511

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

lib/IDE/CodeCompletion.cpp

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3179,19 +3179,10 @@ class CompletionLookup final : public swift::VisibleDeclConsumer {
31793179
Kind = LookupKind::ValueExpr;
31803180
NeedLeadingDot = !HaveDot;
31813181

3182-
// This is horrible
31833182
ExprType = ExprType->getRValueType();
3183+
assert(!ExprType->hasTypeParameter());
3184+
31843185
this->ExprType = ExprType;
3185-
if (ExprType->hasTypeParameter()) {
3186-
DeclContext *DC = nullptr;
3187-
if (VD)
3188-
DC = VD->getInnermostDeclContext();
3189-
else if (auto NTD = ExprType->getInOutObjectType()
3190-
->getMetatypeInstanceType()->getAnyNominal())
3191-
DC = NTD;
3192-
if (DC)
3193-
ExprType = DC->mapTypeIntoContext(ExprType);
3194-
}
31953186

31963187
// Handle special cases
31973188
bool isIUO = VD && VD->getAttrs()

0 commit comments

Comments
 (0)