cuelang.org/go@v0.10.1/cue/testdata/fulleval/046_non-structural_direct_cycles.txtar (about)

     1  # DO NOT EDIT; generated by go run testdata/gen.go
     2  #
     3  #name: non-structural direct cycles
     4  #evalFull
     5  -- in.cue --
     6  c1: {bar: baz: 2} & c1.bar
     7  c2: {bar:      1} & c2.bar
     8  -- out/def --
     9  c1: {
    10  	bar: {
    11  		baz: 2
    12  	}
    13  } & c1.bar
    14  c2: _|_ // conflicting values {bar: 1} and 1 (mismatched types struct and int)
    15  -- out/legacy-debug --
    16  <0>{c1: <1>{bar: <2>{baz: 2}, baz: 2}, c2: _|_(conflicting values {bar: 1} and 1 (mismatched types struct and int))}
    17  -- out/compile --
    18  --- in.cue
    19  {
    20    c1: ({
    21      bar: {
    22        baz: 2
    23      }
    24    } & 〈0;c1〉.bar)
    25    c2: ({
    26      bar: 1
    27    } & 〈0;c2〉.bar)
    28  }
    29  -- out/eval/stats --
    30  Leaks:  0
    31  Freed:  7
    32  Reused: 3
    33  Allocs: 4
    34  Retain: 2
    35  
    36  Unifications: 7
    37  Conjuncts:    10
    38  Disjuncts:    8
    39  -- out/evalalpha --
    40  Errors:
    41  c2: conflicting values 1 and {bar:1} (mismatched types int and struct):
    42      ./in.cue:2:5
    43      ./in.cue:2:16
    44  c2: cannot combine regular field "bar" with 1:
    45      ./in.cue:2:16
    46  
    47  Result:
    48  (_|_){
    49    // [eval]
    50    c1: (struct){
    51      bar: (struct){
    52        baz: (int){ 2 }
    53      }
    54      baz: (int){ 2 }
    55    }
    56    c2: (_|_){
    57      // [eval] c2: conflicting values 1 and {bar:1} (mismatched types int and struct):
    58      //     ./in.cue:2:5
    59      //     ./in.cue:2:16
    60      // c2: cannot combine regular field "bar" with 1:
    61      //     ./in.cue:2:16
    62      bar: (int){ 1 }
    63    }
    64  }
    65  -- diff/-out/evalalpha<==>+out/eval --
    66  diff old new
    67  --- old
    68  +++ new
    69  @@ -2,6 +2,8 @@
    70   c2: conflicting values 1 and {bar:1} (mismatched types int and struct):
    71       ./in.cue:2:5
    72       ./in.cue:2:16
    73  +c2: cannot combine regular field "bar" with 1:
    74  +    ./in.cue:2:16
    75   
    76   Result:
    77   (_|_){
    78  @@ -16,6 +18,8 @@
    79       // [eval] c2: conflicting values 1 and {bar:1} (mismatched types int and struct):
    80       //     ./in.cue:2:5
    81       //     ./in.cue:2:16
    82  +    // c2: cannot combine regular field "bar" with 1:
    83  +    //     ./in.cue:2:16
    84       bar: (int){ 1 }
    85     }
    86   }
    87  -- diff/todo/p3 --
    88  Additional error message. Seems okay.
    89  -- out/eval --
    90  Errors:
    91  c2: conflicting values 1 and {bar:1} (mismatched types int and struct):
    92      ./in.cue:2:5
    93      ./in.cue:2:16
    94  
    95  Result:
    96  (_|_){
    97    // [eval]
    98    c1: (struct){
    99      bar: (struct){
   100        baz: (int){ 2 }
   101      }
   102      baz: (int){ 2 }
   103    }
   104    c2: (_|_){
   105      // [eval] c2: conflicting values 1 and {bar:1} (mismatched types int and struct):
   106      //     ./in.cue:2:5
   107      //     ./in.cue:2:16
   108      bar: (int){ 1 }
   109    }
   110  }