Inspectopedia Help

Unnecessary 'self'

Reports usages of self as a qualifier where it is not required by an escaping closure.

Suggests removing redundant self.

Example:

struct URL { func loadAsync() { print(self.path) DispatchQueue.global().async { self.loadSync() } } }

After the quick-fix is applied:

struct URL { func loadAsync() { print(path) DispatchQueue.global().async { loadSync() } } }

Inspection Details

Available in:

AppCode 2023.3

Plugin:

Swift Language Support, 233.SNAPSHOT

Last modified: 13 July 2023