Avatar
Avatar
Iceman
@swift-6.2.3 struct Foo: ~Escapable { let value: Int init() { self.value = 2 } } func f() async { let foo = Foo() await g() print(foo.value) } func g() async {} (edited)
exit status 1 with stderr:<stdin>:3:3: error: an initializer cannot return a ~Escapable result 1 | struct Foo: ~Escapable { 2 | let value: Int 3 | init() { self.value = 2 } | `- error: an initializer cannot return a ~Escapable result 4 | } 5 | func f() async { (edited)