You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a very strong suspicion that the last three were meant to be of type StreamType, just like the first one. However, they explicitly state a value but no type, which means they are actually untyped numeric constants. The only time when the type can be omitted and it "inherits" from the previous declaration is when both type and value are omitted.
Sadly, changing this is technically a breaking change, since any code that might be referring to these and expecting them to implicitly be converted to an int (for example) would encounter a compilation error if we "fix" this. However, given that this seems like an obvious accident, maybe there's room for entertaining a fix?
Here's the Go code that defines these constants: https://github.com/bufbuild/connect-go/blob/main/connect.go#L48-L53
I have a very strong suspicion that the last three were meant to be of type
StreamType
, just like the first one. However, they explicitly state a value but no type, which means they are actually untyped numeric constants. The only time when the type can be omitted and it "inherits" from the previous declaration is when both type and value are omitted.Sadly, changing this is technically a breaking change, since any code that might be referring to these and expecting them to implicitly be converted to an
int
(for example) would encounter a compilation error if we "fix" this. However, given that this seems like an obvious accident, maybe there's room for entertaining a fix?The text was updated successfully, but these errors were encountered: