-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Remove FunctionType::getInput() #19560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove FunctionType::getInput() #19560
Conversation
Use the parameter list instead of the input type.
23d8654
to
3b60ae1
Compare
@swift-ci Please test |
@swift-ci Please test source compatibility |
@@ -192,17 +192,17 @@ DeclName TypeChecker::getObjectLiteralConstructorName(ObjectLiteralExpr *expr) { | |||
/// unambiguous name. | |||
Type TypeChecker::getObjectLiteralParameterType(ObjectLiteralExpr *expr, | |||
ConstructorDecl *ctor) { | |||
Type argType = ctor->getArgumentInterfaceType(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With some light refactoring in CSDiag, this can be made to speak in terms of params as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't feel any great urgency in doing that at this point in time. Using composeInput() on arbitrary (non-tuple-splattable) argument lists is certainly blocking InOutType removal. However, a much bigger task blocking that is the ApplyExpr argument list representation. And also, CSDiag is currently on the way out. So it may very well happen that CSDiag will be mostly gutted before we move on to the next step of this refactoring.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great progress
Build failed |
Build failed |
Build failed |
Build failed |
Build failed |
apple/swift-lldb#936 |
I switched the handful of remaining uses to explicitly call AnyFunctionType::composeInput(). We still don't want to do that for non-materializable tuple types, but surfacing it there allows the code to be refactored later, and means we don't have to store the input type inside the FunctionType anymore. Also, rename
AnyFunctionType::Param::getType()
togetOldType()
, since InOutType will be removed at some point.