It’s possible to write arbitrary text after specifying the @MainActor for a closure. #76540
Labels
accepts invalid
Bug: Accepts invalid
actor isolation
Feature → concurrency: Actor isolation
attributes
Feature: Declaration and type attributes
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler itself
concurrency
Feature: umbrella label for concurrency language features
swift 6.1
type checker
Area → compiler: Semantic analysis
Description
The following strange code compiles incorrectly:
Reproduction
Expected behavior
It should result in some kind of error.
Environment
$ swift --version
swift-driver version: 1.115 Apple Swift version 6.0 (swiftlang-6.0.0.9.10 clang-1600.0.26.2)
Target: arm64-apple-macosx15.0
Additional information
No response
The text was updated successfully, but these errors were encountered: