File tree 1 file changed +80
-20
lines changed
1 file changed +80
-20
lines changed Original file line number Diff line number Diff line change 1
1
-- in.cue --
2
- a: {
2
+ t1: a: {
3
3
foo?: int
4
4
5
5
b: foo
6
6
}
7
- -- out/compile --
8
- --- in.cue
9
- {
10
- a: {
11
- foo?: int
12
- b: 〈0;foo〉
13
- }
7
+ t2: a: {
8
+ b: foo
9
+
10
+ foo?: int
14
11
}
15
12
-- out/eval/stats --
16
13
Leaks: 0
17
- Freed: 4
18
- Reused: 1
19
- Allocs: 3
20
- Retain: 0
14
+ Freed: 9
15
+ Reused: 4
16
+ Allocs: 5
17
+ Retain: 1
21
18
22
- Unifications: 4
23
- Conjuncts: 4
24
- Disjuncts: 4
19
+ Unifications: 9
20
+ Conjuncts: 9
21
+ Disjuncts: 10
22
+ -- out/evalalpha --
23
+ (struct){
24
+ t1: (struct){
25
+ a: (struct){
26
+ foo?: (int){ int }
27
+ b: (_|_){
28
+ // [incomplete] t1.a.b: cannot reference optional field: foo:
29
+ // ./in.cue:4:5
30
+ }
31
+ }
32
+ }
33
+ t2: (struct){
34
+ a: (struct){
35
+ b: (int){ int }
36
+ foo?: (int){ int }
37
+ }
38
+ }
39
+ }
40
+ -- diff/-out/evalalpha<==>+out/eval --
41
+ diff old new
42
+ --- old
43
+ +++ new
44
+ @@ -10,10 +10,7 @@
45
+ }
46
+ t2: (struct){
47
+ a: (struct){
48
+ - b: (_|_){
49
+ - // [incomplete] t2.a.b: cannot reference optional field: foo:
50
+ - // ./in.cue:7:5
51
+ - }
52
+ + b: (int){ int }
53
+ foo?: (int){ int }
54
+ }
55
+ }
56
+ -- diff/todo/p1 --
57
+ t2: reference resolves to optional field.
25
58
-- out/eval --
26
59
(struct){
27
- a: (struct){
28
- foo?: (int){ int }
29
- b: (_|_){
30
- // [incomplete] a.b: cannot reference optional field: foo:
31
- // ./in.cue:4:5
60
+ t1: (struct){
61
+ a: (struct){
62
+ foo?: (int){ int }
63
+ b: (_|_){
64
+ // [incomplete] t1.a.b: cannot reference optional field: foo:
65
+ // ./in.cue:4:5
66
+ }
67
+ }
68
+ }
69
+ t2: (struct){
70
+ a: (struct){
71
+ b: (_|_){
72
+ // [incomplete] t2.a.b: cannot reference optional field: foo:
73
+ // ./in.cue:7:5
74
+ }
75
+ foo?: (int){ int }
32
76
}
33
77
}
34
78
}
79
+ -- out/compile --
80
+ --- in.cue
81
+ {
82
+ t1: {
83
+ a: {
84
+ foo?: int
85
+ b: 〈0;foo〉
86
+ }
87
+ }
88
+ t2: {
89
+ a: {
90
+ b: 〈0;foo〉
91
+ foo?: int
92
+ }
93
+ }
94
+ }
You can’t perform that action at this time.
0 commit comments