-
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.crashBug: A crash, i.e., an abnormal termination of softwareBug: A crash, i.e., an abnormal termination of softwaretriage neededThis issue needs more specific labelsThis issue needs more specific labels
Description
Description
I find the following code crashed compiler. The culprit seems to be @isolated(any) and some function in the body (not sure which one it's).
extension GlobalActor {
static func assumeIsolated<T: Sendable>(_ operation: @isolated(any) () throws -> T) rethrows -> T {
return try withoutActuallyEscaping(operation) { escapingClosure in
try unsafeBitCast(escapingClosure, to: (() throws -> T).self)()
}
}
}
Reproduction
See above
Stack dump
See https://godbolt.org/z/ddKrqaaYE
Expected behavior
Compiler shouldn't crash.
Environment
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.crashBug: A crash, i.e., an abnormal termination of softwareBug: A crash, i.e., an abnormal termination of softwaretriage neededThis issue needs more specific labelsThis issue needs more specific labels