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