cuelang.org/go@v0.10.1/internal/core/export/testdata/selfcontained/selfcontained.txtar (about)

     1  #path: a.b
     2  
     3  TODO: alternatives to consider
     4  - `b.s` rewrites to `s` here. But we could interpret this as
     5     a "closed" value and write string instead. So
     6  
     7  	s: string
     8  	t: string
     9  
    10  	or
    11  
    12  	s: string
    13  	t: _s
    14  	_s: string
    15  
    16     Theoretically this seems more appropriate. It just may not be
    17     what users expect. Note that `t: s` would still remain `t: s`,
    18     as that reference does not refer to a node outside the closed
    19     node.
    20  
    21  -- in.cue --
    22  x: "out"
    23  y: {
    24  	s: "foo"
    25  	t: "bar"
    26  }
    27  let X = "a: " + x
    28  
    29  a: b: {
    30  	c: x
    31  	// TODO: should most likely resolve to "out", not c, because b points to
    32  	// outside the exported value
    33  	d: b.c
    34  	e: y
    35  	f: X
    36  	g: "a: " + x // TODO: resolve
    37  
    38  	s: string
    39  	t: b.s
    40  }
    41  -- out/self/default --
    42  c: "out"
    43  // TODO: should most likely resolve to "out", not c, because b points to
    44  // outside the exported value
    45  d: c
    46  e: {
    47  	s: "foo"
    48  	t: "bar"
    49  }
    50  f: "a: " + "out"
    51  g: "a: " + "out"
    52  s: string
    53  t: s