Skip to content

[stdlib] remove preconditions from compatibility entry point #42076

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 29, 2022

Conversation

glessard
Copy link
Contributor

@glessard glessard commented Mar 29, 2022

  • The old implementation of UnsafePointer.withMemoryRebound had no precondition checking.
  • When implementing SE-0333, we forwarded the old entry point to the new implementation, which has a debug
    precondition. (see SE-0333: Expand usability of withMemoryRebound #39529)
  • This change removes the debug precondition from the compatibility entry point, reverting its previous behaviour.

Resolves rdar://90462471

- The old implementation of `UnsafePointer.withMemoryRebound` had no preconditions.
- When implementing SE-0333, we forwarded the old entry point to the new implementation, which has preconditions.
- This change removes the precondition from the compatibility entry point, reverting it to its previous behaviour.
- This resolves rdar://90462471
@glessard
Copy link
Contributor Author

@swift-ci please smoke test

@glessard glessard merged commit 3e739f6 into swiftlang:main Mar 29, 2022
@glessard glessard deleted the se-withMemoryRebound branch March 29, 2022 17:41
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.

2 participants