I agree that this is more a bug than a feature; this was an oversight in the implementation as far as I’m concerned. Something that is RawRepresentable
as a String
or Int
encodes as a String
or Int
by default everywhere else, and I don’t think this should be different.
The one thing we need to figure out is how bad the regression would be if we changed behavior, as we would introduce incompatibility in the other direction.
Do you or @zarghol mind filing a bug about this, please? If we don’t break too much, we should do this sooner rather than later before folks rely on this behavior (if that’s really possible).