-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Open
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.triage neededThis issue needs more specific labelsThis issue needs more specific labels
Description
Description
actor A {
func dumpSignature() {
print(type(of: Self.dumpSignature)) // error: call to actor-isolated instance method 'dumpSignature()' in a synchronous nonisolated context [#ActorIsolatedCall]
let fn = Self.dumpSignature // same error as above
}
}In contrast, GAIT works fine.
@globalActor
actor MyGlobal {
static let shared = MyGlobal()
}
@MyGlobal
struct S {
func dumpSignature() {
print(type(of: Self.dumpSignature)) // OK
}
}Reproduction
See above
Expected behavior
The first example should compile.
Environment
x86-64 swiftc nightly on godbolt
Additional information
No response
Metadata
Metadata
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.triage neededThis issue needs more specific labelsThis issue needs more specific labels