encoding/yaml: decode empty YAML files as `*null | _`
This allows empty YAML files to be loaded with non-empty YAML files,
which usually decode as structs, without resulting in conflicts.
The default allows the loading of a single empty YAML file to still
result in a concrete `null` value, which is desirable.
Thanks to Roger for coming up with the disjunction idea.
Fixes #3744.
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: I9a2c4d9ec45af6ff080ffa25ad07ac913552cdc1
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1211360
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Roger Peppe <rogpeppe@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>