-- in.cue --
_Q: [{pos: 0}, {pos: 1}]

a: [rn=string]: _Q[0:len(a[rn])]
a: ben: [{}] @test(eq, [{pos: 0}])

b: [rn=string]: _Q[0:1]
b: ben: [{}] @test(eq, [{pos: 0}])

c: [rn=string]: [...{l: len(a[rn])}]
c: ben: [{}] @test(eq, [{l: 1}])

#d: {[rn=string]: [...{pos: uint}] & _Q[0:len(#d[rn])]} @test(shareID=D)
#d: ben: [{}] @test(eq, [{pos: 0}])

d: #d @test(shareID=D)
-- out/eval/stats --
Leaks:  0
Freed:  26
Reused: 21
Allocs: 5
Retain: 0

Unifications: 26
Conjuncts:    56
Disjuncts:    28
