| # DO NOT EDIT; generated by go run testdata/gen.go |
| # |
| #name: len of incomplete types |
| #evalFull |
| -- in.cue -- |
| args: *[] | [...string] |
| v1: len(args) |
| v2: len([]) |
| v3: len({}) |
| v4: len({a: 3}) |
| v5: len({a: 3} | {a: 4}) |
| v6: len('sf' | 'dd') |
| v7: len([2] | *[1, 2]) |
| v8: len([2] | [1, 2]) |
| v9: len("😂") |
| v10: len("") |
| -- out/def -- |
| args: *[] | [...string] |
| v1: 0 |
| v2: 0 |
| v3: 0 |
| v4: 1 |
| v5: len({ |
| a: 3 |
| } | { |
| a: 4 |
| }) |
| v6: len('sf' | 'dd') |
| v7: 2 |
| v8: len([2] | [1, 2]) |
| v9: 4 |
| v10: 0 |
| -- out/legacy-debug -- |
| <0>{args: [], v1: 0, v2: 0, v3: 0, v4: 1, v5: len ((<1>{a: 3} | <2>{a: 4})), v6: len (('sf' | 'dd')), v7: 2, v8: len (([2] | [1,2])), v9: 4, v10: 0} |
| -- out/eval -- |
| (struct){ |
| args: (list){ |(*(#list){ |
| }, (list){ |
| }) } |
| v1: (int){ 0 } |
| v2: (int){ 0 } |
| v3: (int){ 0 } |
| v4: (int){ 1 } |
| v5: (_|_){ |
| // [incomplete] v5: unresolved disjunction {a:3} | {a:4} (type struct): |
| // ./in.cue:6:7 |
| } |
| v6: (_|_){ |
| // [incomplete] v6: unresolved disjunction 'sf' | 'dd' (type bytes): |
| // ./in.cue:7:7 |
| } |
| v7: (int){ 2 } |
| v8: (_|_){ |
| // [incomplete] v8: unresolved disjunction [2] | [1,2] (type list): |
| // ./in.cue:9:7 |
| } |
| v9: (int){ 4 } |
| v10: (int){ 0 } |
| } |
| -- out/compile -- |
| --- in.cue |
| { |
| args: (*[]|[ |
| ...string, |
| ]) |
| v1: len(〈0;args〉) |
| v2: len([]) |
| v3: len({}) |
| v4: len({ |
| a: 3 |
| }) |
| v5: len(({ |
| a: 3 |
| }|{ |
| a: 4 |
| })) |
| v6: len(('sf'|'dd')) |
| v7: len(([ |
| 2, |
| ]|*[ |
| 1, |
| 2, |
| ])) |
| v8: len(([ |
| 2, |
| ]|[ |
| 1, |
| 2, |
| ])) |
| v9: len("😂") |
| v10: len("") |
| } |