Skip to content

Sema: Propagate noescape bit into closure passed to withoutActuallyEscaping [4.2 6/11] #17166

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

Conversation

slavapestov
Copy link
Contributor

@slavapestov slavapestov commented Jun 13, 2018

  • Description: Fixes a Swift 4.2 regression where closure literals passed to withoutActuallyEscaping() were treated as escaping if they contained multiple statements, causing Sema to diagnose member accesses not qualified with self.

  • Scope of the issue: Source compatibility break for users of withoutActuallyEscaping, reported a couple of times.

  • Origination: Introduced at some point in the 4.2 cycle after type checker cleanups. The visitor logic around closures is a bit flaky, because multi-statement closures are treated different from single-expression; the latter are effectively part of the expression that contains them, but the former must be visited separately.

  • Risk: Very low.

  • Radar: Fixes rdar://problem/40853562.

  • Tested: Added test case from radar.

  • Reviewed by: @jckarter (on master)

@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@slavapestov slavapestov merged commit 76dc890 into swiftlang:swift-4.2-branch-06-11-2018 Jun 13, 2018
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.

1 participant