diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2020-04-25 11:01:02 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2020-04-25 11:01:02 +0200 |
| commit | b8bb8e5f8eb6ae928f08698df222d4e5e2b74c2d (patch) | |
| tree | afc4f3b920efb87e5029f2b6fdeb385ae729bb72 /sys | |
| parent | b3cb1996a4f40025f58ea785f1e555d851e10149 (diff) | |
pkg/serializer: support primitive user types in interfaces
Add handling of user types that has underlying primitive types.
Consider:
type T int
var obj interface{} = T(42)
T has kind reflect.Int. But if we serialize obj as just "42",
it will be turned into plain int.
Detect this case and serialize obj as "T(42)".
Diffstat (limited to 'sys')
0 files changed, 0 insertions, 0 deletions
