Merge pull request #59949 from DougGregor/super-call-concurrency-adjust

Cope with concurrency-related function type adjustments in calls to "super".
This commit is contained in:
Doug Gregor
2022-07-07 13:53:18 -07:00
committed by GitHub
2 changed files with 27 additions and 0 deletions

View File

@@ -1303,7 +1303,10 @@ public:
CanType superFormalType = arg->getType()->getCanonicalType();
// The callee for a super call has to be either a method or constructor.
// There might be one level of conversion in between.
Expr *fn = apply->getFn();
if (auto fnConv = dyn_cast<FunctionConversionExpr>(fn))
fn = fnConv->getSubExpr();
SubstitutionMap substitutions;
SILDeclRef constant;
if (auto *ctorRef = dyn_cast<OtherConstructorDeclRefExpr>(fn)) {