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

     1  #path: a.b.#def
     2  
     3  The trick here is that we hoist values that are both cyclic as well as a
     4  definition. The behavior of the definition should be retained, and the
     5  cyclic references should be substituted accordingly.
     6  -- in.cue --
     7  a: b: #def: {
     8  	opt?: #def
     9  
    10  	list: [...#def]
    11  }
    12  -- out/self/default --
    13  X.#def
    14  
    15  let X = {
    16  	#def: {
    17  		opt?: #def
    18  		list: [...#def]
    19  	}
    20  }