mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Minor NFC cleanups
This commit is contained in:
@@ -2816,7 +2816,7 @@ RValue RValueEmitter::visitObjCSelectorExpr(ObjCSelectorExpr *e, SGFContext C) {
|
||||
for (auto member : selectorDecl->getMembers()) {
|
||||
if (auto var = dyn_cast<VarDecl>(member)) {
|
||||
if (!var->isStatic() && var->hasStorage()) {
|
||||
selectorMemberTy = var->getInterfaceType()->getRValueType();
|
||||
selectorMemberTy = var->getInterfaceType();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5265,7 +5265,7 @@ bool FailureDiagnosis::diagnoseArgumentGenericRequirements(
|
||||
// requirements e.g. <A, B where A.Element == B.Element>.
|
||||
for (unsigned i = 0, e = bindings.size(); i != e; ++i) {
|
||||
auto param = params[i];
|
||||
auto paramType = param.getType()->getInOutObjectType();
|
||||
auto paramType = param.getPlainType();
|
||||
|
||||
auto archetype = paramType->getAs<ArchetypeType>();
|
||||
if (!archetype)
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user