Skip to content

Commit b871a08

Browse files
committed
Sema: Remove a usage of replaceCovariantResultType()
1 parent 75cf2c1 commit b871a08

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Sema/CSApply.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1411,8 +1411,8 @@ namespace {
14111411
// first, because CovariantReturnConversionExpr does not support
14121412
// direct conversions from a class C to an existential C & P.
14131413
convTy = cs.getType(baseExpr)->getMetatypeInstanceType();
1414-
convTy =
1415-
thunkTy->getResult()->replaceCovariantResultType(convTy, 0);
1414+
if (thunkTy->getResult()->getOptionalObjectType())
1415+
convTy = OptionalType::get(thunkTy);
14161416
} else {
14171417
convTy = thunkTy->getResult();
14181418
}

0 commit comments

Comments
 (0)