import Dispatch func indirect(_ f: @escaping () -> Void) { f() } struct S { var a: Int = 42 mutating func foo() { func cl() { a = 50 indirect { cl() } } cl() print(a) } } var s = S() s.foo()