Avatar
Avatar
Yuta Saito
@swift-main -warn-concurrency var mutableG = 0 func const() -> Int { mutableG = 1 return 42 } let const2: Int = 42 actor A { init() { _ = const() _ = const2 } }
swiftNightly BOT 11/30/2021 3:38 AM
stderr:<stdin>:3:3: warning: reference to var 'mutableG' is not concurrency-safe because it involves shared mutable state mutableG = 1 ^ <stdin>:1:5: note: var declared here var mutableG = 0 ^