Commit 8d099aa
committed
cmd/cue: Go types implementing a supported interface are themselves supported
Otherwise, the tweaked test case type, which implements yaml.Marshaler,
would get discarded as an unsupported struct given that it's only
made up of unexported fields.
Note that the existing CustomYAML test case was buggy;
it did not actually use the correct MarshalYAML method signature,
so we weren't testing the fact that it was a custom yaml.Marshaler.
This is now fixed, which causes it to generate as "top" as expected.
Fixes #3495.
Signed-off-by: Daniel Martí <[email protected]>
Change-Id: Ie9926daf829e21c9e9f117f1a813edcd9b6f50d3
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1224699
TryBot-Result: CUEcueckoo <[email protected]>
Reviewed-by: Roger Peppe <[email protected]>1 parent 21abc7f commit 8d099aa
2 files changed
+17
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
732 | 732 | | |
733 | 733 | | |
734 | 734 | | |
735 | | - | |
| 735 | + | |
736 | 736 | | |
737 | 737 | | |
738 | 738 | | |
| |||
976 | 976 | | |
977 | 977 | | |
978 | 978 | | |
979 | | - | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
980 | 984 | | |
981 | 985 | | |
982 | 986 | | |
| |||
1015 | 1019 | | |
1016 | 1020 | | |
1017 | 1021 | | |
1018 | | - | |
| 1022 | + | |
1019 | 1023 | | |
1020 | | - | |
| 1024 | + | |
1021 | 1025 | | |
1022 | | - | |
| 1026 | + | |
1023 | 1027 | | |
1024 | | - | |
| 1028 | + | |
1025 | 1029 | | |
1026 | | - | |
| 1030 | + | |
1027 | 1031 | | |
1028 | 1032 | | |
1029 | 1033 | | |
1030 | 1034 | | |
1031 | | - | |
| 1035 | + | |
1032 | 1036 | | |
1033 | 1037 | | |
1034 | 1038 | | |
1035 | 1039 | | |
1036 | 1040 | | |
1037 | 1041 | | |
1038 | | - | |
| 1042 | + | |
1039 | 1043 | | |
1040 | 1044 | | |
1041 | 1045 | | |
| |||
1365 | 1369 | | |
1366 | 1370 | | |
1367 | 1371 | | |
1368 | | - | |
| 1372 | + | |
1369 | 1373 | | |
1370 | 1374 | | |
1371 | 1375 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
| 218 | + | |
218 | 219 | | |
219 | 220 | | |
220 | | - | |
| 221 | + | |
221 | 222 | | |
222 | 223 | | |
223 | 224 | | |
| |||
479 | 480 | | |
480 | 481 | | |
481 | 482 | | |
482 | | - | |
| 483 | + | |
483 | 484 | | |
484 | 485 | | |
485 | 486 | | |
| |||
0 commit comments