| # DO NOT EDIT; generated by go run testdata/gen.go |
| # |
| #name: resolved self-reference cycles |
| #evalPartial |
| -- in.cue -- |
| a: b - 100 |
| b: a + 100 |
| b: 200 |
| |
| c: [c[1], a] |
| |
| s1: s2 & {a: 1} |
| s2: s3 & {b: 2} |
| s3: s1 & {c: 3} |
| -- out/def -- |
| a: 100 |
| b: 200 |
| c: [100, 100] |
| s1: s2 & { |
| a: 1 |
| } |
| s2: s3 & { |
| b: 2 |
| } |
| s3: s1 & { |
| c: 3 |
| } |
| -- out/export -- |
| a: 100 |
| b: 200 |
| c: [100, 100] |
| s1: { |
| a: 1 |
| b: 2 |
| c: 3 |
| } |
| s2: { |
| a: 1 |
| b: 2 |
| c: 3 |
| } |
| s3: { |
| a: 1 |
| b: 2 |
| c: 3 |
| } |
| -- out/yaml -- |
| a: 100 |
| b: 200 |
| c: |
| - 100 |
| - 100 |
| s1: |
| a: 1 |
| b: 2 |
| c: 3 |
| s2: |
| a: 1 |
| b: 2 |
| c: 3 |
| s3: |
| a: 1 |
| b: 2 |
| c: 3 |
| -- out/json -- |
| {"a":100,"b":200,"c":[100,100],"s1":{"a":1,"b":2,"c":3},"s2":{"a":1,"b":2,"c":3},"s3":{"a":1,"b":2,"c":3}} |
| -- out/legacy-debug -- |
| <0>{a: 100, b: 200, c: [100,100], s1: <1>{a: 1, b: 2, c: 3}, s2: <2>{a: 1, b: 2, c: 3}, s3: <3>{a: 1, b: 2, c: 3}} |
| -- out/compile -- |
| --- in.cue |
| { |
| a: (〈0;b〉 - 100) |
| b: (〈0;a〉 + 100) |
| b: 200 |
| c: [ |
| 〈0;c〉[1], |
| 〈0;a〉, |
| ] |
| s1: (〈0;s2〉 & { |
| a: 1 |
| }) |
| s2: (〈0;s3〉 & { |
| b: 2 |
| }) |
| s3: (〈0;s1〉 & { |
| c: 3 |
| }) |
| } |
| -- out/eval -- |
| (struct){ |
| a: (int){ 100 } |
| b: (int){ 200 } |
| c: (#list){ |
| 0: (int){ 100 } |
| 1: (int){ 100 } |
| } |
| s1: (struct){ |
| c: (int){ 3 } |
| b: (int){ 2 } |
| a: (int){ 1 } |
| } |
| s2: (struct){ |
| a: (int){ 1 } |
| c: (int){ 3 } |
| b: (int){ 2 } |
| } |
| s3: (struct){ |
| b: (int){ 2 } |
| a: (int){ 1 } |
| c: (int){ 3 } |
| } |
| } |