isolated
keyword in passed closure can cause compiler crash on macOS and Windows only
#62377
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
concurrency
Feature: umbrella label for concurrency language features
Description
When I try to pass a specific type of closure, namely an
@escaping (isolated SomeActor) -> @Sendable (Arguments...) async -> Result
and then try to immediately call that closure, I get a compiler error on Windows and macOS (and NOT Ubuntu, according to my actions runner for this bug's repo).
If I remove
isolated
from the closure:@escaping (SomeActor) -> @Sendable (Arguments...) async -> Result
everything compiles just fine.
Steps to reproduce
Clone the repo at https://github.com/gregcotten/swift-actor-functions-bug
Just run on macOS or Windows with 5.7.1 Release:
swift build -Xswiftc -DNOT_BROKEN
and all is well! But if you run:
swift build
or, to get an understandable error:swift build --use-integrated-swift-driver
Environment
error dump from macOS below:
The text was updated successfully, but these errors were encountered: