We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 75cf2c1 commit b871a08Copy full SHA for b871a08
lib/Sema/CSApply.cpp
@@ -1411,8 +1411,8 @@ namespace {
1411
// first, because CovariantReturnConversionExpr does not support
1412
// direct conversions from a class C to an existential C & P.
1413
convTy = cs.getType(baseExpr)->getMetatypeInstanceType();
1414
- convTy =
1415
- thunkTy->getResult()->replaceCovariantResultType(convTy, 0);
+ if (thunkTy->getResult()->getOptionalObjectType())
+ convTy = OptionalType::get(thunkTy);
1416
} else {
1417
convTy = thunkTy->getResult();
1418
}
0 commit comments