@isolated(any) closure can be assigned to non isolated closure property #80823
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
triage needed
This issue needs more specific labels
Description
The compiler allows to set an
@isolated(any)
closure to a property that is not isolated itself. Shouldn't this throw a compilation error?Reproduction
Expected behavior
The compiler should not allow
self.getString = getString
, unlessvar getString: @Sendable () -> String
is changed tovar getString: @isolated(any) @Sendable () -> String
.Environment
swift-driver version: 1.120.5 Apple Swift version 6.1 (swiftlang-6.1.0.110.21 clang-1700.0.13.3)
Target: arm64-apple-macosx15.0
Additional information
No response
The text was updated successfully, but these errors were encountered: