...

Text file src/cuelang.org/go/cue/testdata/definitions/list.txtar

Documentation: cuelang.org/go/cue/testdata/definitions

     1-- in.cue --
     2c: #R & {
     3	w: [{}, {b: int}]
     4}
     5#R: {
     6	w: [{}, ...]
     7}
     8-- out/eval/stats --
     9Leaks:  0
    10Freed:  9
    11Reused: 4
    12Allocs: 5
    13Retain: 1
    14
    15Unifications: 9
    16Conjuncts:    14
    17Disjuncts:    10
    18-- out/evalalpha --
    19(struct){
    20  c: (#struct){
    21    w: (#list){
    22      0: (#struct){
    23      }
    24      1: (#struct){
    25        b: (int){ int }
    26      }
    27    }
    28  }
    29  #R: (#struct){
    30    w: (list){
    31      0: (#struct){
    32      }
    33    }
    34  }
    35}
    36-- diff/-out/evalalpha<==>+out/eval --
    37diff old new
    38--- old
    39+++ new
    40@@ -3,7 +3,7 @@
    41     w: (#list){
    42       0: (#struct){
    43       }
    44-      1: (struct){
    45+      1: (#struct){
    46         b: (int){ int }
    47       }
    48     }
    49-- diff/explanation --
    50Bug fix. Struct is correctly closed in new evaluator.
    51-- out/eval --
    52(struct){
    53  c: (#struct){
    54    w: (#list){
    55      0: (#struct){
    56      }
    57      1: (struct){
    58        b: (int){ int }
    59      }
    60    }
    61  }
    62  #R: (#struct){
    63    w: (list){
    64      0: (#struct){
    65      }
    66    }
    67  }
    68}
    69-- out/compile --
    70--- in.cue
    71{
    72  c: (〈0;#R〉 & {
    73    w: [
    74      {},
    75      {
    76        b: int
    77      },
    78    ]
    79  })
    80  #R: {
    81    w: [
    82      {},
    83      ...,
    84    ]
    85  }
    86}

View as plain text