Closed flexlixrup closed 5 months ago
Just discovered that the SwiftUI view should have
@ObservedObject var csvState: CSVState
instead of @StateObject var csvState: CSVState
and then it is safe to remove the self but it's a small bug nevertheless.
@flexlixrup this is a known issue where SwiftFormat can't tell from call-site context that this is a closure. You can workaround it by adding --selfrequired BarFoo to the .swiftformat config.
Ok perfect thanks for the answer. Then this issue can be closed I guess.
I have a NSViewRepresentable with a Coordinator inside this class
In this example Swiftformat tries to remove the
self
but Swift gives me the following compiler errorReference to property 'parent' in closure requires explicit use of 'self' to make capture semantics explicit