cuelang.org/go@v0.10.1/cue/testdata/fulleval/001_conflicts_in_optional_fields_are_okay_.txtar (about)

     1  # DO NOT EDIT; generated by go run testdata/gen.go
     2  #
     3  #name: conflicts in optional fields are okay 
     4  #evalFull
     5  -- in.cue --
     6  d: {a: 1, b?: 3} | {a: 2}
     7  
     8  // the following conjunction should not eliminate any disjuncts
     9  c: d & {b?: 4}
    10  -- out/def --
    11  d: {
    12  	a:  1
    13  	b?: 3
    14  } | {
    15  	a: 2
    16  }
    17  
    18  // the following conjunction should not eliminate any disjuncts
    19  c: d & {
    20  	b?: 4
    21  }
    22  -- out/legacy-debug --
    23  <0>{d: (<1>{a: 1, b?: 3} | <2>{a: 2}), c: (<3>{a: 1, b?: (3 & 4)} | <4>{a: 2, b?: 4})}
    24  -- out/compile --
    25  --- in.cue
    26  {
    27    d: ({
    28      a: 1
    29      b?: 3
    30    }|{
    31      a: 2
    32    })
    33    c: (〈0;d〉 & {
    34      b?: 4
    35    })
    36  }
    37  -- out/eval/stats --
    38  Leaks:  0
    39  Freed:  14
    40  Reused: 9
    41  Allocs: 5
    42  Retain: 0
    43  
    44  Unifications: 10
    45  Conjuncts:    17
    46  Disjuncts:    14
    47  -- out/evalalpha --
    48  (struct){
    49    d: (struct){ |((struct){
    50        a: (int){ 1 }
    51        b?: (int){ 3 }
    52      }, (struct){
    53        a: (int){ 2 }
    54      }) }
    55    c: (struct){ |((struct){
    56        b?: (_|_){
    57          // [eval] c.b: conflicting values 3 and 4:
    58          //     ./in.cue:1:15
    59          //     ./in.cue:4:13
    60        }
    61        a: (int){ 1 }
    62      }, (struct){
    63        b?: (int){ 4 }
    64        a: (int){ 2 }
    65      }) }
    66  }
    67  -- diff/-out/evalalpha<==>+out/eval --
    68  diff old new
    69  --- old
    70  +++ new
    71  @@ -9,7 +9,6 @@
    72         b?: (_|_){
    73           // [eval] c.b: conflicting values 3 and 4:
    74           //     ./in.cue:1:15
    75  -        //     ./in.cue:4:4
    76           //     ./in.cue:4:13
    77         }
    78         a: (int){ 1 }
    79  -- diff/todo/p3 --
    80  Missing error position.
    81  -- out/eval --
    82  (struct){
    83    d: (struct){ |((struct){
    84        a: (int){ 1 }
    85        b?: (int){ 3 }
    86      }, (struct){
    87        a: (int){ 2 }
    88      }) }
    89    c: (struct){ |((struct){
    90        b?: (_|_){
    91          // [eval] c.b: conflicting values 3 and 4:
    92          //     ./in.cue:1:15
    93          //     ./in.cue:4:4
    94          //     ./in.cue:4:13
    95        }
    96        a: (int){ 1 }
    97      }, (struct){
    98        b?: (int){ 4 }
    99        a: (int){ 2 }
   100      }) }
   101  }