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

nonisolated missing from generated code #75

Closed
bluemon82 opened this issue Sep 10, 2024 · 0 comments · Fixed by #80
Closed

nonisolated missing from generated code #75

bluemon82 opened this issue Sep 10, 2024 · 0 comments · Fixed by #80
Labels
bug Something isn't working

Comments

@bluemon82
Copy link

When I define a nonisolated variable the generated codes misses the definition.

@Mockable
protocol Repo: Actor {
    nonisolated var didLogin: PassthroughSubject<Void, Never> { get }
}

Which generated this code:

actor MockRepo: Repo, MockableService {
    var didLogin: PassthroughSubject<Void, Never> 
}

When compiling this error is thrown:
Error: Actor-isolated property 'didLogin' cannot be used to satisfy nonisolated protocol requirement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants