-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Strip Out More TypeLocs #31390
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
Strip Out More TypeLocs #31390
Conversation
@swift-ci test |
@swift-ci test source compatibility |
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.
Looks good to me!
@@ -3706,15 +3702,15 @@ class ClosureExpr : public AbstractClosureExpr { | |||
SourceLoc InLoc; | |||
|
|||
/// The explicitly-specified result type. | |||
TypeLoc ExplicitResultType; | |||
TypeExpr *ExplicitResultType; |
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 only out of place thing about this is that TypeExpr *
type is always a metatype which is not really intended here right? Maybe we should hide the fact that inside closure explicit type is represented via TypeExpr
and instead only expose TypeRepr
and Type
to the outside?
@swift-ci test |
@swift-ci test Windows |
Alright, I've hidden that abstraction. ⛵ |
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.
LGTM! Sorry I missed the update.
Remove TypeLoc from
Type checking for closures is now somewhat simpler.