mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Sema: Simplify getConcreteReplacementForProtocolSelfType()
This commit is contained in:
@@ -4325,15 +4325,9 @@ Type constraints::getConcreteReplacementForProtocolSelfType(ValueDecl *member) {
|
||||
if (!DC->getSelfProtocolDecl())
|
||||
return Type();
|
||||
|
||||
GenericSignature signature;
|
||||
if (auto *genericContext = member->getAsGenericContext()) {
|
||||
signature = genericContext->getGenericSignature();
|
||||
} else {
|
||||
signature = DC->getGenericSignatureOfContext();
|
||||
}
|
||||
|
||||
auto sig = member->getInnermostDeclContext()->getGenericSignatureOfContext();
|
||||
auto selfTy = DC->getSelfInterfaceType();
|
||||
return signature->getConcreteType(selfTy);
|
||||
return sig->getConcreteType(selfTy);
|
||||
}
|
||||
|
||||
static bool isOperator(Expr *expr, StringRef expectedName) {
|
||||
|
||||
Reference in New Issue
Block a user