cuelang.org/go@v0.10.1/cue/testdata/cycle/issue241.txtar (about)

     1  -- in.cue --
     2  #Value: 0 | 1
     3  
     4  foo: #Value
     5  foo: !=bar
     6  bar: #Value
     7  bar: !=foo
     8  
     9  #Value: 0 | 1
    10  
    11  Foo: #Value
    12  Foo: !=Bar
    13  Bar: #Value
    14  Bar: !=Foo
    15  Bar: 0
    16  
    17  cell: a: 0 | 1
    18  cell: a: !=cell.b
    19  cell: b: 0 | 1
    20  cell: b: !=cell.a
    21  cell: a: 0
    22  cell: b: _
    23  
    24  a: cell.a
    25  b: cell.b
    26  -- out/eval/stats --
    27  Leaks:  0
    28  Freed:  47
    29  Reused: 39
    30  Allocs: 8
    31  Retain: 7
    32  
    33  Unifications: 11
    34  Conjuncts:    101
    35  Disjuncts:    47
    36  -- out/evalalpha --
    37  (struct){
    38    #Value: (int){ |((int){ 0 }, (int){ 1 }) }
    39    foo: (int){ |((int){ 0 }, (int){ 1 }) }
    40    bar: (int){ |((int){ 0 }, (int){ 1 }) }
    41    Foo: (int){ |((int){ 0 }, (int){ 1 }) }
    42    Bar: (int){ 0 }
    43    cell: (struct){
    44      a: (int){ 0 }
    45      b: (int){ 1 }
    46    }
    47    a: (int){ 0 }
    48    b: (int){ 1 }
    49  }
    50  -- diff/-out/evalalpha<==>+out/eval --
    51  diff old new
    52  --- old
    53  +++ new
    54  @@ -1,11 +1,8 @@
    55   (struct){
    56     #Value: (int){ |((int){ 0 }, (int){ 1 }) }
    57  -  foo: (_|_){
    58  -    // [incomplete] foo: unresolved disjunction 0 | 1 (type int):
    59  -    //     ./in.cue:4:6
    60  -  }
    61  +  foo: (int){ |((int){ 0 }, (int){ 1 }) }
    62     bar: (int){ |((int){ 0 }, (int){ 1 }) }
    63  -  Foo: (int){ 1 }
    64  +  Foo: (int){ |((int){ 0 }, (int){ 1 }) }
    65     Bar: (int){ 0 }
    66     cell: (struct){
    67       a: (int){ 0 }
    68  -- diff/todo/p0 --
    69  many errors: resolve scalars correctly in combination with disjunctions
    70  foo: alternative: no error, but include constraints in output.
    71  -- out/eval --
    72  (struct){
    73    #Value: (int){ |((int){ 0 }, (int){ 1 }) }
    74    foo: (_|_){
    75      // [incomplete] foo: unresolved disjunction 0 | 1 (type int):
    76      //     ./in.cue:4:6
    77    }
    78    bar: (int){ |((int){ 0 }, (int){ 1 }) }
    79    Foo: (int){ 1 }
    80    Bar: (int){ 0 }
    81    cell: (struct){
    82      a: (int){ 0 }
    83      b: (int){ 1 }
    84    }
    85    a: (int){ 0 }
    86    b: (int){ 1 }
    87  }
    88  -- out/compile --
    89  --- in.cue
    90  {
    91    #Value: (0|1)
    92    foo: 〈0;#Value〉
    93    foo: !=〈0;bar〉
    94    bar: 〈0;#Value〉
    95    bar: !=〈0;foo〉
    96    #Value: (0|1)
    97    Foo: 〈0;#Value〉
    98    Foo: !=〈0;Bar〉
    99    Bar: 〈0;#Value〉
   100    Bar: !=〈0;Foo〉
   101    Bar: 0
   102    cell: {
   103      a: (0|1)
   104    }
   105    cell: {
   106      a: !=〈1;cell〉.b
   107    }
   108    cell: {
   109      b: (0|1)
   110    }
   111    cell: {
   112      b: !=〈1;cell〉.a
   113    }
   114    cell: {
   115      a: 0
   116    }
   117    cell: {
   118      b: _
   119    }
   120    a: 〈0;cell〉.a
   121    b: 〈0;cell〉.b
   122  }