cuelang.org/go@v0.13.0/cue/testdata/resolve/008_attributes.txtar (about) 1 #name: attributes 2 #evalPartial 3 -- in.cue -- 4 a: {foo: 1 @foo() @baz(1)} 5 b: {foo: 1 @bar() @foo()} 6 c: a & b 7 8 e: a & {foo: 1 @foo(other)} 9 -- out/def -- 10 a: { 11 foo: 1 @baz(1) @foo() 12 } 13 b: { 14 foo: 1 @bar() @foo() 15 } 16 c: a & b 17 e: _|_ // conflicting attributes for key "foo" 18 -- out/legacy-debug -- 19 <0>{a: <1>{foo: 1 @baz(1) @foo()}, b: <2>{foo: 1 @bar() @foo()}, c: <3>{foo: 1 @bar() @baz(1) @foo()}, e: _|_((<4>.a & <5>{foo: 1 @foo(other)}):conflicting attributes for key "foo")} 20 -- out/compile -- 21 --- in.cue 22 { 23 a: { 24 foo: 1 25 } 26 b: { 27 foo: 1 28 } 29 c: (〈0;a〉 & 〈0;b〉) 30 e: (〈0;a〉 & { 31 foo: 1 32 }) 33 } 34 -- out/eval/stats -- 35 Leaks: 0 36 Freed: 9 37 Reused: 6 38 Allocs: 3 39 Retain: 0 40 41 Unifications: 9 42 Conjuncts: 16 43 Disjuncts: 9 44 -- out/eval -- 45 (struct){ 46 a: (struct){ 47 foo: (int){ 1 } 48 } 49 b: (struct){ 50 foo: (int){ 1 } 51 } 52 c: (struct){ 53 foo: (int){ 1 } 54 } 55 e: (struct){ 56 foo: (int){ 1 } 57 } 58 }