-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[NFC] Remove AbstractFunctionDecl::computeType() #27806
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
[NFC] Remove AbstractFunctionDecl::computeType() #27806
Conversation
@swift-ci please test and merge |
Types Are Hard. |
@@ -750,7 +750,9 @@ static FuncDecl *deriveEncodable_encode(DerivedConformance &derived) { | |||
encodeDecl->getAttrs().add(attr); | |||
} | |||
|
|||
encodeDecl->computeType(FunctionType::ExtInfo().withThrows()); |
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.
Ah, these aren't correct. The throws
bit goes on the inner function type.
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.
You need to store the throws bit somewhere now.
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.
The throwing bit gets applied to the ext info based on whether the throwing bit is set in the function decl. Both the changed places in the Codable conformance synthesis stuff are already setting that.
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.
Ah, ok.
Its functionality is entirely subsumed by InterfaceTypeRequest.
dc9ef49
to
497a222
Compare
@swift-ci please smoke test |
@@ -177,7 +176,7 @@ getBuiltinFunction(Identifier Id, ArrayRef<Type> argTypes, Type ResType, | |||
/*GenericParams=*/nullptr, | |||
paramList, | |||
TypeLoc::withoutLoc(ResType), DC); | |||
FD->computeType(Info); | |||
(void)FD->getInterfaceType(); |
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.
None of the new calls to (void)fn->getInterfaceType() should be necessary. Were you not able to remove them?
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'm bad at rebasing, and when I was writing this up this morning I must have built on top of a bad revision. I think these can all go away now.
Talked with Slava out-of-band. Going to land removing the calls to |
⛵️ |
Its functionality is entirely subsumed by InterfaceTypeRequest.