Swift analyzer error on new Swift 4.2 Syntax


(Simon Hartmann) #1

The new Swift 4.2 Syntax includes new best practices for the weak/strong management in closures. Guarding for a strong reference to self is done like this:

guard let self = self else { return }

This gives in the newest version of the scanner an error:

String is not parsed
guard let self = self else { return }

Expected Behaviour
The syntax should be valid, as it is a new feature and best practice.

Please add support for this new syntax.

(Colin Mueller) #2