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

"[…] cannot be marked as '@Sendable'" #27

Open
vladdeSV opened this issue Mar 17, 2024 · 2 comments
Open

"[…] cannot be marked as '@Sendable'" #27

vladdeSV opened this issue Mar 17, 2024 · 2 comments

Comments

@vladdeSV
Copy link

vladdeSV commented Mar 17, 2024

With Xcode 15.3, I get this warning on the load() method.

Instance methods of non-Sendable types cannot be marked as '@sendable'; this is an error in Swift 6

@wyk111wyk
Copy link

I think you can simplely change the usage to
content(phase) .task(id: urlRequest) { await load() }
And then remove @sendable, warning would be gone.

@vladdeSV
Copy link
Author

That solved the warning, and my code seems to work all right!

Thanks @wyk111wyk 🙌

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

No branches or pull requests

2 participants