A command-line tool and Xcode Extension for formatting Swift code
7.63k
stars
623
forks
source link
`redundantSelf` causes an unnecessary warning when a closure has specified an actor and uses a name of a property for parameter #1625
Closed
juri closed 4 months ago
I have this class, which seems to be syntactically correct (at least
swift repl
is OK with it):And this SwiftFormat configuration:
Running
swiftformat . --lint
gives me these warnings:This seems te caused by
@MainActor
in the closure. If I rename either the propertyp
or the closure parameterp
, the warnings go away too.This is with SwiftFormat 0.53.1.