github.com/joomcode/cue@v0.4.4-0.20221111115225-539fe3512047/cue/testdata/eval/unify.txtar (about)

     1  -- in.cue --
     2  a: d: {
     3  	#base
     4  	#info: {...}
     5  	Y: #info.X
     6  }
     7  
     8  #base: {
     9  	#info: {...}
    10  }
    11  
    12  a: [Name=string]: {#info: {
    13  	X: "foo"
    14  }}
    15  -- out/eval --
    16  (struct){
    17    a: (struct){
    18      d: (#struct){
    19        #info: (#struct){
    20          X: (string){ "foo" }
    21        }
    22        Y: (string){ "foo" }
    23      }
    24    }
    25    #base: (#struct){
    26      #info: (#struct){
    27      }
    28    }
    29  }
    30  -- out/compile --
    31  --- in.cue
    32  {
    33    a: {
    34      d: {
    35        〈2;#base〉
    36        #info: {
    37          ...
    38        }
    39        Y: 〈0;#info〉.X
    40      }
    41    }
    42    #base: {
    43      #info: {
    44        ...
    45      }
    46    }
    47    a: {
    48      [string]: {
    49        #info: {
    50          X: "foo"
    51        }
    52      }
    53    }
    54  }