Skip to content

Revert "Allow implicit self in escaping closures when self usage is unlikely to cause cycle" #28903

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

Closed
wants to merge 1 commit into from

Conversation

compnerd
Copy link
Member

Reverts #23934

This should restore the Windows CI to green. Revert to ensure that the CI is green during lockdown.

@compnerd
Copy link
Member Author

@swift-ci please test Windows platform

@shahmishal
Copy link
Member

@swift-ci smoke test

@theblixguy
Copy link
Collaborator

theblixguy commented Dec 20, 2019

cc @Jumhyn it seems like expr/closure.swift test is failing on Windows due to your changes. Could you investigate why this is happening?

@drodriguez
Copy link
Contributor

drodriguez commented Dec 20, 2019

By the way, I think the problem lies in https://github.com/apple/swift/pull/23934/files#diff-3f6a161822412eea4b0e705487dd88c1L2446-L2447

    bracketRange = SourceRange(consumeToken(tok::l_square),
                               consumeToken(tok::r_square));

The order in which the parameters are evaluated is implementation defined, and in MSVC happens to be reverse order.

So I think the assertion happens because tok::r_square is being consumed before tok::l_square.

If everyone agrees, I would not mind preparing a PR with the change.

@drodriguez
Copy link
Contributor

Created #28906 with a possible fix. Linux doesn't show a difference. I hope MSVC will.

@theblixguy
Copy link
Collaborator

Thank you @drodriguez!

@compnerd
Copy link
Member Author

Yeah, lets go with #28906 instead.

@compnerd compnerd closed this Dec 20, 2019
@compnerd compnerd deleted the revert-23934-implicit-self-capture branch December 20, 2019 21:39
@Jumhyn
Copy link
Member

Jumhyn commented Dec 21, 2019

Was traveling all day today so just catching up on this. Thanks for jumping on that @drodriguez! Is there a reason that Windows is not a part of the CI workflow before merging?

@drodriguez
Copy link
Contributor

Many. The Windows machines (2) are not managed by Apple. They are part of the community CI. Growing that number further will allow pre-merge validation, but growing that number if painful because deploying/managing Windows is painful and the community CI requirements. We are quite diligent in catching most problems post-merge, but with the branch freezes, we have a little bit of a scramble.

In any case, thanks for the contribution. It was a very non obvious things to catch coding or reviewing (it took me a couple of times looking where the assertion was happening for my lightbulb to light up :D).

@Jumhyn
Copy link
Member

Jumhyn commented Dec 21, 2019

Gotcha, thanks for the context. Excellent catch!

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