Why does this property wrapper usage fail to compile?
@propertyWrapper
struct Trimmed {
private var value = ""
var wrappedValue: String {
get { value }
set { value = newValue.trimmingCharacters(in: .whitespaces) }
}
}
func greet(@Trimmed name: String) {
print("Hi \(name)")
}
let w = greet(name: " Sam ")