Skip to content

[SR-832][Sema] Fix for function type args passed to @autoclosure params #1494

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 1 commit into from
Mar 1, 2016

Conversation

gregomni
Copy link
Contributor

@gregomni gregomni commented Mar 1, 2016

Passing a function type to an @autoclosure param would always fail to type check because of the attempt to decompose the parallel structure of the two (both being functions). In this case, though, we don’t want to do any such thing, we want to allow the ExprRewriter to explicitly insert an AutoClosureExpr in coerceToType, as it would do with any other non-function arg type.

Passing a function type to an @autoclosure param would always fail to
type check because of the attempt to decompose the parallel structure
of the two (both being functions). In this case, though, we don’t want
to do any such thing, we want to allow the ExprRewriter to explicitly
insert an AutoClosureExpr in coerceToType, as it would do with any
other non-function arg type.
@gregomni
Copy link
Contributor Author

gregomni commented Mar 1, 2016

I'm just curious whether this will work with having a commit bit now:

@swift-ci Please test

@dduan
Copy link
Contributor

dduan commented Mar 1, 2016

@gregomni In my email Ted mentioned that only Apple contributors can trigger CI for now.

@gregomni
Copy link
Contributor Author

gregomni commented Mar 1, 2016

@dduan Thanks! Yep, he told me the same, but since the swift-ci blog post says "with commit access", I thought I'd give it a shot anyway to make sure.

@gribozavr
Copy link
Contributor

@swift-ci Please test

gregomni added a commit that referenced this pull request Mar 1, 2016
[SR-832][Sema] Fix for function type args passed to @autoclosure params
@gregomni gregomni merged commit 88c6cdb into swiftlang:master Mar 1, 2016
@jckarter
Copy link
Contributor

jckarter commented Mar 1, 2016

Awesome to see this fixed!

@paulyoung
Copy link

Thanks @gregomni!

@gregomni gregomni deleted the sr-832 branch August 18, 2020 23:12
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.

5 participants