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
method to go/constant.Kind for returning the kind's name.
Rationale: When debugging cmd/compile and go/types issues involving go/constant.Value, I'm often finding myself checking the Value.Kind(). However, printing these out with Printf simply prints the ordinal value, and I can never remember which constant kinds are which. It would be very convenient if they just printed as "Int" or "Float" directly.
This proposal is to add a
method to go/constant.Kind for returning the kind's name.
Rationale: When debugging cmd/compile and go/types issues involving go/constant.Value, I'm often finding myself checking the Value.Kind(). However, printing these out with Printf simply prints the ordinal value, and I can never remember which constant kinds are which. It would be very convenient if they just printed as "Int" or "Float" directly.
/cc @griesemer
The text was updated successfully, but these errors were encountered: