Skip to content

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

Merged
merged 5 commits into from
Apr 29, 2020
Merged

Strip Out More TypeLocs #31390

merged 5 commits into from
Apr 29, 2020

Conversation

CodaFi
Copy link
Contributor

@CodaFi CodaFi commented Apr 29, 2020

Remove TypeLoc from

  • ClosureExpr
  • UnresolvedSpecializeExpr
  • EditorPlaceholderExpr

Type checking for closures is now somewhat simpler.

@CodaFi CodaFi requested a review from nathawes April 29, 2020 03:17
@CodaFi
Copy link
Contributor Author

CodaFi commented Apr 29, 2020

@swift-ci test

@CodaFi
Copy link
Contributor Author

CodaFi commented Apr 29, 2020

@swift-ci test source compatibility

@CodaFi CodaFi requested a review from xedin April 29, 2020 03:18
Copy link
Contributor

@nathawes nathawes left a 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;
Copy link
Contributor

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?

@CodaFi
Copy link
Contributor Author

CodaFi commented Apr 29, 2020

@swift-ci test

@CodaFi
Copy link
Contributor Author

CodaFi commented Apr 29, 2020

@swift-ci test Windows

@CodaFi
Copy link
Contributor Author

CodaFi commented Apr 29, 2020

Alright, I've hidden that abstraction.

@CodaFi CodaFi merged commit f946392 into swiftlang:master Apr 29, 2020
@CodaFi CodaFi deleted the tone-loc branch April 29, 2020 23:46
Copy link
Contributor

@xedin xedin left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants