The Identifiers section of the Swift language reference do not seem to allow identifiers such as a$b, but I can currently type
let a$b = 4
Is this intended? There's no reference to U+0024 (dollar sign) and, following the specification, $ should be only used for implicit parameter names and property wrappers' projections.
This is not a bug, even before property wrappers were a thing you could write let _$foo which compiled just fine. Removing it now is a breaking change.
var _foo = Binding<Int>(...)
var foo: Int {
get {
_foo.wrappedValue
}
set {
_foo.wrappedValue = newValue
}
}
var _$foo: Binding<Int> {
_foo.projectedValue
}
I will refactor this when we officially have property wrapper support for local variables.