[SR-15227] MainActor static variable initialization not enforced on main thread. #57549
Labels
actor isolation
Feature → concurrency: Actor isolation
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
concurrency
Feature: umbrella label for concurrency language features
let & var
Feature: constant and variable declarations
SILGen
Area → compiler: The SIL generation stage
static declarations
Feature → declarations: Static declarations
swift 5.5
unexpected behavior
Bug: Unexpected behavior or incorrect output
Environment
swift-driver version: 1.26.9 Apple Swift version 5.5 (swiftlang-1300.0.31.1 clang-1300.0.29.1)
Additional Detail from JIRA
md5: 084c5699ba4bca8acdf7ced11d06439a
cloned to:
Issue Description:
While
fooCall()
is enforced on the main thread, the initialization of the static variable is not, which breaks the contract of@MainActor
.The text was updated successfully, but these errors were encountered: