Skip to content

stdlib: Guard @inlinable use of withMemoryRebound() with #if $TypedThrows #72301

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

Conversation

tshortli
Copy link
Contributor

Older compilers can no longer see the definition of withMemoryRebound() now that it has adopted typed throws (#72036).

Resolves rdar://124540428

…pedThrows`.

Older compilers can no longer see the definition of `withMemoryRebound()` now
that it has adopted typed throws (swiftlang#72036).

Resolves rdar://124540428
@tshortli tshortli requested a review from a team as a code owner March 13, 2024 18:39
@tshortli tshortli requested a review from glessard March 13, 2024 18:39
@tshortli
Copy link
Contributor Author

@swift-ci please smoke test

Copy link
Contributor

@glessard glessard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that you went much further in the #else case in this commit. Is fatalError() sufficient?

@glessard glessard enabled auto-merge March 13, 2024 20:39
@tshortli
Copy link
Contributor Author

I see that you went much further in the #else case in this commit. Is fatalError() sufficient?

When there is a reasonable fallback we might as well call it to be more forgiving to the code built by older compilers. But we don't appear to have a simple fallback option in this case so I just went with fatalError and hope the code built in this configuration does not need these functions.

@glessard
Copy link
Contributor

OK. Now that I've been alerted I'll add the fallbacks in the future.

@glessard glessard merged commit 30a76d7 into swiftlang:main Mar 13, 2024
@tshortli tshortli deleted the with-memory-rebound-typed-throws-condfail branch March 14, 2024 00:10
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