...
1# DO NOT EDIT; generated by go run testdata/gen.go
2#
3#name: optional field resolves to incomplete
4#evalPartial
5-- in.cue --
6r: {
7 a?: 3
8 b: a
9 c: r["a"]
10}
11-- out/def --
12r: {
13 a?: 3
14 b: a
15 c: r["a"]
16}
17-- out/legacy-debug --
18<0>{r: <1>{a?: 3, b: <2>.a, c: <3>.r["a"]}}
19-- out/compile --
20--- in.cue
21{
22 r: {
23 a?: 3
24 b: 〈0;a〉
25 c: 〈1;r〉["a"]
26 }
27}
28-- out/eval/stats --
29Leaks: 0
30Freed: 5
31Reused: 2
32Allocs: 3
33Retain: 0
34
35Unifications: 5
36Conjuncts: 5
37Disjuncts: 5
38-- out/eval --
39(struct){
40 r: (struct){
41 a?: (int){ 3 }
42 b: (_|_){
43 // [incomplete] r.b: cannot reference optional field: a:
44 // ./in.cue:3:6
45 }
46 c: (_|_){
47 // [incomplete] r.c: cannot reference optional field: a:
48 // ./in.cue:4:8
49 }
50 }
51}
View as plain text