github.com/solo-io/cue@v0.4.7/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 --
    30  Errors:
    31  c2: conflicting values 1 and {bar:1} (mismatched types int and struct):
    32      ./in.cue:2:5
    33      ./in.cue:2:16
    34  
    35  Result:
    36  (_|_){
    37    // [eval]
    38    c1: (struct){
    39      bar: (struct){
    40        baz: (int){ 2 }
    41      }
    42      baz: (int){ 2 }
    43    }
    44    c2: (_|_){
    45      // [eval] c2: conflicting values 1 and {bar:1} (mismatched types int and struct):
    46      //     ./in.cue:2:5
    47      //     ./in.cue:2:16
    48      bar: (int){ 1 }
    49    }
    50  }