Since some is a keyword that pertains only to types, it can still be used as a regular variable name. So this PR adds a pattern for let/var declarations with types, so that the some pattern can be enabled only where appropriate.
func opaqueTypes() -> some View {}
struct Foo {
let some: Int? = .some(42)
var body: some View {}
}
Documentation:
Opaque result types are used heavily in SwiftUI code, for example:
Since
some
is a keyword that pertains only to types, it can still be used as a regular variable name. So this PR adds a pattern forlet
/var
declarations with types, so that thesome
pattern can be enabled only where appropriate.