File tree Expand file tree Collapse file tree 3 files changed +240
-215
lines changed Expand file tree Collapse file tree 3 files changed +240
-215
lines changed Original file line number Diff line number Diff line change @@ -1350,10 +1350,6 @@ class alignas(1 << TypeAlignInBits) TypeBase
1350
1350
// / Hack to deal with ConstructorDecl interface types.
1351
1351
Type withCovariantResultType ();
1352
1352
1353
- // / Deprecated in favor of the above.
1354
- Type replaceCovariantResultType (Type newResultType,
1355
- unsigned uncurryLevel);
1356
-
1357
1353
// / Returns a new function type exactly like this one but with the self
1358
1354
// / parameter replaced. Only makes sense for function members of types.
1359
1355
Type replaceSelfParameterType (Type newSelf);
Original file line number Diff line number Diff line change @@ -1393,37 +1393,6 @@ Type TypeBase::withCovariantResultType() {
1393
1393
fnType->getExtInfo ());
1394
1394
}
1395
1395
1396
- Type TypeBase::replaceCovariantResultType (Type newResultType,
1397
- unsigned uncurryLevel) {
1398
- if (uncurryLevel == 0 ) {
1399
- bool isLValue = is<LValueType>();
1400
-
1401
- auto loadedTy = getWithoutSpecifierType ();
1402
- if (auto objectType = loadedTy->getOptionalObjectType ()) {
1403
- newResultType = OptionalType::get (
1404
- objectType->replaceCovariantResultType (newResultType, uncurryLevel));
1405
- }
1406
-
1407
- return isLValue ? LValueType::get (newResultType) : newResultType;
1408
- }
1409
-
1410
- // Determine the input and result types of this function.
1411
- auto fnType = this ->castTo <AnyFunctionType>();
1412
- auto inputType = fnType->getParams ();
1413
- Type resultType =
1414
- fnType->getResult ()->replaceCovariantResultType (newResultType,
1415
- uncurryLevel - 1 );
1416
-
1417
- // Produce the resulting function type.
1418
- if (auto genericFn = dyn_cast<GenericFunctionType>(fnType)) {
1419
- return GenericFunctionType::get (genericFn->getGenericSignature (),
1420
- inputType, resultType,
1421
- fnType->getExtInfo ());
1422
- }
1423
-
1424
- return FunctionType::get (inputType, resultType, fnType->getExtInfo ());
1425
- }
1426
-
1427
1396
// / Whether this parameter accepts an unlabeled trailing closure argument
1428
1397
// / using the more-restrictive forward-scan rule.
1429
1398
static bool allowsUnlabeledTrailingClosureParameter (const ParamDecl *param) {
You can’t perform that action at this time.
0 commit comments