...

Text file src/cuelang.org/go/internal/core/export/testdata/selfcontained/selfcontained.txtar

Documentation: cuelang.org/go/internal/core/export/testdata/selfcontained

     1#path: a.b
     2
     3TODO: 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 --
    22x: "out"
    23y: {
    24	s: "foo"
    25	t: "bar"
    26}
    27let X = "a: " + x
    28
    29a: 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/default --
    42c: "out"
    43// TODO: should most likely resolve to "out", not c, because b points to
    44// outside the exported value
    45d: c
    46e: {
    47	s: "foo"
    48	t: "bar"
    49}
    50f: "a: " + "out"
    51g: "a: " + "out"
    52s: string
    53t: s

View as plain text