Minor NFC cleanups

This commit is contained in:
Slava Pestov
2018-08-08 10:09:20 -07:00
parent cf664b2654
commit b67752a15f
3 changed files with 3 additions and 5 deletions

View File

@@ -384,9 +384,7 @@ static Type findBaseTypeForReplacingArchetype(const ValueDecl *VD, const Type Ty
return Type();
// Find the nominal type decl related to VD.
NominalTypeDecl *NTD = VD->getDeclContext()->
getAsNominalTypeOrNominalTypeExtensionContext();
if (!NTD)
if (!VD->getDeclContext()->isTypeContext())
return Type();
return Ty->getRValueType()->getRValueInstanceType();