internal/cuetxtar: restrict @test(allows) to struct/list
Restrict @test(allows) to struct and list values: calling val.Allows on
a scalar produces meaningless results (always true). An error is now
reported when the directive is used on a non-struct, non-list value.
Signed-off-by: Marcel van Lohuizen <mpvl@gmail.com>
Change-Id: I20f11886cf29f86fad9fc5c12c518a1ad5dd9116
Reviewed-on: https://cue.gerrithub.io/c/cue-lang/cue/+/1235354
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>