cuelang.org/go@v0.10.1/cue/testdata/definitions/issue493.txtar (about)

     1  -- in.cue --
     2  #Artifact: {
     3  	body: _
     4  	other: [string]: int
     5  }
     6  
     7  #App:  #Artifact
     8  #Atom: #Artifact
     9  
    10  #Both: #App | #Atom
    11  
    12  t1: #Both & {body: 3}
    13  -- out/eval/stats --
    14  Leaks:  0
    15  Freed:  24
    16  Reused: 19
    17  Allocs: 5
    18  Retain: 0
    19  
    20  Unifications: 20
    21  Conjuncts:    38
    22  Disjuncts:    24
    23  -- out/eval --
    24  (struct){
    25    #Artifact: (#struct){
    26      body: (_){ _ }
    27      other: (#struct){
    28      }
    29    }
    30    #App: (#struct){
    31      body: (_){ _ }
    32      other: (#struct){
    33      }
    34    }
    35    #Atom: (#struct){
    36      body: (_){ _ }
    37      other: (#struct){
    38      }
    39    }
    40    #Both: (#struct){
    41      body: (_){ _ }
    42      other: (#struct){
    43      }
    44    }
    45    t1: (#struct){
    46      body: (int){ 3 }
    47      other: (#struct){
    48      }
    49    }
    50  }
    51  -- out/compile --
    52  --- in.cue
    53  {
    54    #Artifact: {
    55      body: _
    56      other: {
    57        [string]: int
    58      }
    59    }
    60    #App: 〈0;#Artifact〉
    61    #Atom: 〈0;#Artifact〉
    62    #Both: (〈0;#App〉|〈0;#Atom〉)
    63    t1: (〈0;#Both〉 & {
    64      body: 3
    65    })
    66  }