mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
AST: Rename old form of {Generic,}FunctionType::get() to getOld()
This makes it easier to grep for and eventually remove the
remaining usages.
It also allows you to write FunctionType::get({}, ...) to call the
ArrayRef overload empty parameter list, instead of picking the Type
overload and calling it with an empty Type() value.
While I"m at it, in a few places instead of renaming just clean up
usages where it was completely mechanical to do so.
This commit is contained in:
@@ -1131,7 +1131,7 @@ namespace {
|
||||
|
||||
// Add the member constraint for a subscript declaration.
|
||||
// FIXME: weak name!
|
||||
auto fnTy = FunctionType::get(inputTv, outputTy);
|
||||
auto fnTy = FunctionType::getOld(inputTv, outputTy);
|
||||
|
||||
// FIXME: synthesizeMaterializeForSet() wants to statically dispatch to
|
||||
// a known subscript here. This might be cleaner if we split off a new
|
||||
@@ -1528,7 +1528,7 @@ namespace {
|
||||
CS.getConstraintLocator(expr, ConstraintLocator::RValueAdjustment));
|
||||
|
||||
// The function/enum case must be callable with the given argument.
|
||||
auto funcTy = FunctionType::get(CS.getType(arg), outputTy);
|
||||
auto funcTy = FunctionType::getOld(CS.getType(arg), outputTy);
|
||||
CS.addConstraint(ConstraintKind::ApplicableFunction, funcTy,
|
||||
memberTy,
|
||||
CS.getConstraintLocator(expr, ConstraintLocator::ApplyFunction));
|
||||
@@ -1578,7 +1578,7 @@ namespace {
|
||||
TVO_CanBindToLValue |
|
||||
TVO_PrefersSubtypeBinding);
|
||||
auto resultTy = CS.createTypeVariable(CS.getConstraintLocator(expr));
|
||||
auto methodTy = FunctionType::get(argsTy, resultTy);
|
||||
auto methodTy = FunctionType::getOld(argsTy, resultTy);
|
||||
CS.addValueMemberConstraint(
|
||||
baseTy, expr->getName(), methodTy, CurDC,
|
||||
expr->getFunctionRefKind(),
|
||||
@@ -2503,8 +2503,8 @@ namespace {
|
||||
if (isa<ClosureExpr>(fnExpr->getSemanticsProvidingExpr()))
|
||||
extInfo = extInfo.withNoEscape();
|
||||
|
||||
auto funcTy = FunctionType::get(CS.getType(expr->getArg()), outputTy,
|
||||
extInfo);
|
||||
auto funcTy = FunctionType::getOld(CS.getType(expr->getArg()), outputTy,
|
||||
extInfo);
|
||||
|
||||
CS.addConstraint(ConstraintKind::ApplicableFunction, funcTy,
|
||||
CS.getType(expr->getFn()),
|
||||
|
||||
Reference in New Issue
Block a user