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

     1  TODO: l4 should be allowed
     2  
     3  -- in.cue --
     4  #def1: l1: ["l2"]: {l3: int, l4: 26}
     5  #special1: #def1     & {l1: l2: l3: <100}
     6  instance:  #special1 & {l1: l2: l3: 34}
     7  -- out/eval --
     8  (struct){
     9    #def1: (#struct){
    10      l1: (#struct){
    11      }
    12    }
    13    #special1: (#struct){
    14      l1: (#struct){
    15        l2: (#struct){
    16          l3: (int){ &(<100, int) }
    17          l4: (int){ 26 }
    18        }
    19      }
    20    }
    21    instance: (#struct){
    22      l1: (#struct){
    23        l2: (#struct){
    24          l3: (int){ 34 }
    25          l4: (int){ 26 }
    26        }
    27      }
    28    }
    29  }
    30  -- out/compile --
    31  --- in.cue
    32  {
    33    #def1: {
    34      l1: {
    35        ["l2"]: {
    36          l3: int
    37          l4: 26
    38        }
    39      }
    40    }
    41    #special1: (〈0;#def1〉 & {
    42      l1: {
    43        l2: {
    44          l3: <100
    45        }
    46      }
    47    })
    48    instance: (〈0;#special1〉 & {
    49      l1: {
    50        l2: {
    51          l3: 34
    52        }
    53      }
    54    })
    55  }