...
1-- in.cue --
2#TopLevel: [name=string]: {
3 path: string
4 content: string
5}
6
7#Mid: #TopLevel & {
8 myoutput: path: "/output"
9}
10
11val: #Mid & {} & {myoutput: {content: "foo"}} // Should work.
12-- out/eval/stats --
13Leaks: 0
14Freed: 10
15Reused: 6
16Allocs: 4
17Retain: 0
18
19Unifications: 10
20Conjuncts: 23
21Disjuncts: 10
22-- out/evalalpha --
23(struct){
24 #TopLevel: (#struct){
25 }
26 #Mid: (#struct){
27 myoutput: (#struct){
28 path: (string){ "/output" }
29 content: (string){ string }
30 }
31 }
32 val: (#struct){
33 myoutput: (#struct){
34 content: (string){ "foo" }
35 path: (string){ "/output" }
36 }
37 }
38}
39-- diff/-out/evalalpha<==>+out/eval --
40diff old new
41--- old
42+++ new
43@@ -9,8 +9,8 @@
44 }
45 val: (#struct){
46 myoutput: (#struct){
47- path: (string){ "/output" }
48 content: (string){ "foo" }
49+ path: (string){ "/output" }
50 }
51 }
52 }
53-- diff/todo/p3 --
54Reordering
55-- out/eval --
56(struct){
57 #TopLevel: (#struct){
58 }
59 #Mid: (#struct){
60 myoutput: (#struct){
61 path: (string){ "/output" }
62 content: (string){ string }
63 }
64 }
65 val: (#struct){
66 myoutput: (#struct){
67 path: (string){ "/output" }
68 content: (string){ "foo" }
69 }
70 }
71}
72-- out/compile --
73--- in.cue
74{
75 #TopLevel: {
76 [string]: {
77 path: string
78 content: string
79 }
80 }
81 #Mid: (〈0;#TopLevel〉 & {
82 myoutput: {
83 path: "/output"
84 }
85 })
86 val: ((〈0;#Mid〉 & {}) & {
87 myoutput: {
88 content: "foo"
89 }
90 })
91}
View as plain text