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

     1  
     2  -- x.cue --
     3  package x
     4  
     5  #C1: {
     6    name: string
     7  }
     8  
     9  #C2: {
    10    #C1
    11    age: int
    12  }
    13  
    14  c1: #C1 & {
    15    name: "cueckoo"
    16  }
    17  
    18  c2: #C2 & {
    19    c1
    20    age: 5
    21  }
    22  -- out/eval --
    23  (struct){
    24    #C1: (#struct){
    25      name: (string){ string }
    26    }
    27    #C2: (#struct){
    28      name: (string){ string }
    29      age: (int){ int }
    30    }
    31    c1: (#struct){
    32      name: (string){ "cueckoo" }
    33    }
    34    c2: (#struct){
    35      name: (string){ "cueckoo" }
    36      age: (int){ 5 }
    37    }
    38  }
    39  -- out/compile --
    40  --- x.cue
    41  {
    42    #C1: {
    43      name: string
    44    }
    45    #C2: {
    46      〈1;#C1〉
    47      age: int
    48    }
    49    c1: (〈0;#C1〉 & {
    50      name: "cueckoo"
    51    })
    52    c2: (〈0;#C2〉 & {
    53      〈1;c1〉
    54      age: 5
    55    })
    56  }