cuelang.org/go@v0.10.1/cue/testdata/builtins/and.txtar (about)

     1  -- in.cue --
     2  merge: and([1, 1])
     3  
     4  // ensure definitions along embedded scalars are preserved.
     5  embed: and([{2, #x: 1}, {2, #x: 2}])
     6  -- out/eval/stats --
     7  Leaks:  2
     8  Freed:  4
     9  Reused: 1
    10  Allocs: 5
    11  Retain: 2
    12  
    13  Unifications: 6
    14  Conjuncts:    13
    15  Disjuncts:    6
    16  -- out/eval --
    17  Errors:
    18  embed.#x: conflicting values 2 and 1:
    19      ./in.cue:4:21
    20      ./in.cue:4:33
    21  
    22  Result:
    23  (_|_){
    24    // [eval]
    25    merge: (int){ 1 }
    26    embed: (_|_){
    27      // [eval]
    28      #x: (_|_){
    29        // [eval] embed.#x: conflicting values 2 and 1:
    30        //     ./in.cue:4:21
    31        //     ./in.cue:4:33
    32      }
    33    }
    34  }
    35  -- out/compile --
    36  --- in.cue
    37  {
    38    merge: and([
    39      1,
    40      1,
    41    ])
    42    embed: and([
    43      {
    44        2
    45        #x: 1
    46      },
    47      {
    48        2
    49        #x: 2
    50      },
    51    ])
    52  }