-
Notifications
You must be signed in to change notification settings - Fork 489
Closed
Description
I see that there is support for Proto3 optionals (#1096) however as far as I can tell the generated code does not actually expose these as Swift optionals:
public var email: String {
get {return _email ?? String()}
set {_email = newValue}
}
/// Returns true if `email` has been explicitly set.
public var hasEmail: Bool {return self._email != nil}
/// Clears the value of `email`. Subsequent reads from it will return its default value.
public mutating func clearEmail() {self._email = nil}
This seems to defeat a lot of the ergonomics that would be possible if these came through directly as Swift optionals. If there's some backwards compatibility issues, I'm happy to enable some flag for it.
alex-vasenin, NachoSoto, hstdt, helje5, miroslavkovac and 1 more
Metadata
Metadata
Assignees
Labels
No labels