Avatar
Avatar
koher
@swift-5.5.3 -Xfrontend -warn-concurrency actor SendableExperiment { private var int: Int = 0 private var user2: User2 = .init() private var user3: User3 = .init() private var user4: User4 = .init() private var user5: User5 = .init() func increment() -> Int { int += 1 return int } func incrementAge2() -> User2 { user2.age += 1 return user2 } func incrementAge3() -> User3 { user3.age += 1 return user3 } func incrementAge4() -> User4 { user4.age += 1 return user4 } func incrementAge5() -> User5 { // user5.age += 1 return user5 } } struct User2 { let name: String = "Foo" var age: Int = 42 } public struct User3 { public let name: String = "Foo" public var age: Int = 42 } final class User4 { let name: String = "Foo" var age: Int = 42 } final class User5 { let name: String = "Foo" let age: Int = 42 }
no output