Private type in attribute on public member

I'm surprised that the following code not produce any errors:

@globalActor private final actor PrivateActor {
    static let shared = PrivateActor()
}

public class Foo {
    @PrivateActor public func bar() {}
}

Global actor annotation is part of the function interface, so I would expect it to be required as visible as function itself. Is this a bug?

6 Likes

This is definitely a bug. Would you mind logging a Github issue about this?

1 Like