Skip to content

[embedded] Allow string-interpolating fatalError in Embedded Swift #79581

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

kubamracek
Copy link
Contributor

@kubamracek kubamracek commented Feb 24, 2025

This makes fatalError accept String and string interpolations in Embedded Swift (previously we only accepted StaticString). Given that the String type is nowadays available in Embedded Swift, there's no reason to keep this divergence in the fatalError API between regular Swift and Embedded Swift.

Left TODOs:

  • also apply the same to assert
  • also apply the same to precondition
  • also apply the same to assertionFailure
  • also apply the same to preconditionFailure

TODOs are addressed in #79698.

rdar://138205827

@kubamracek
Copy link
Contributor Author

@swift-ci please test

@kubamracek
Copy link
Contributor Author

@swift-ci please test windows platform

@MaxDesiatov
Copy link
Contributor

@swift-ci test windows

@kubamracek kubamracek force-pushed the embedded-fatalerror-stringinterp branch from 0e5a6c4 to 01d7e23 Compare February 28, 2025 16:53
@kubamracek
Copy link
Contributor Author

@swift-ci please test

@kubamracek kubamracek enabled auto-merge February 28, 2025 16:54
@kubamracek kubamracek merged commit 77fc49c into swiftlang:main Feb 28, 2025
4 of 5 checks passed
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.

3 participants