Skip to content

Commit 54918cb

Browse files
committed
AST: Remove some pointless null checks in substType()
1 parent f107cd0 commit 54918cb

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

lib/AST/Type.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4387,9 +4387,6 @@ static Type getMemberForBaseType(LookupConformanceFn lookupConformances,
43874387
return DependentMemberType::get(baseType, name);
43884388
};
43894389

4390-
// If we don't have a substituted base type, fail.
4391-
if (!substBase) return failed();
4392-
43934390
if (auto *selfType = substBase->getAs<DynamicSelfType>())
43944391
substBase = selfType->getSelfType();
43954392

@@ -4690,9 +4687,6 @@ static Type substType(Type derivedType,
46904687
if (auto depMemTy = dyn_cast<DependentMemberType>(type)) {
46914688
auto newBase = substType(depMemTy->getBase(),
46924689
substitutions, lookupConformances, options);
4693-
if (!newBase)
4694-
return Type();
4695-
46964690
return getMemberForBaseType(lookupConformances,
46974691
depMemTy->getBase(), newBase,
46984692
depMemTy->getAssocType(),

0 commit comments

Comments
 (0)