internal/cuetxtar: extend shareID checks and fix path aliasing
- Fix appendPath: allocate a fresh selector slice so multiple
sibling calls from the same base path do not silently share
the same backing array (cue.Path.Append reuses excess capacity).
- Extend parseAtPath to handle integer segments (at=0 selects
list element 0).
- Extend extractShareIDsFromEqExpr to handle *ast.ListLit in
addition to *ast.StructLit.
- Extend collectDirectShareIDs to scan eq bodies for in-place
@test(shareID=...).
- Change typocheck @test(shareID=Z) to shareID:todo=Z: the v3
evaluator does not yet share Z and #Y vertices here.
Signed-off-by: Marcel van Lohuizen <mpvl@gmail.com>
Change-Id: I3faa20e90e3cd007919217555c367b001b55b312
Reviewed-on: https://cue.gerrithub.io/c/cue-lang/cue/+/1235384
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>