github.com/solo-io/cue@v0.4.7/cue/testdata/definitions/issue419.txtar (about)

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