Skip to content
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

Format with %p leads to compile errors after conversion #222

Open
AlexanderJ opened this issue May 17, 2022 · 1 comment
Open

Format with %p leads to compile errors after conversion #222

AlexanderJ opened this issue May 17, 2022 · 1 comment

Comments

@AlexanderJ
Copy link

This expression is not converted to valid Swift.
https://swiftify.me/w2j01r

Not sure how the valid Swift would look like in this case though.

@alex-swiftify
Copy link
Member

I think the correct way looks like this one, but it's not trivial and rarely used, so keeping this low priority:

        withUnsafePointer(to: self) {
            return String(format: "%p", $0)
        }

Source: https://stackoverflow.com/a/52332748

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants