...

Text file src/cuelang.org/go/cue/testdata/resolve/008_attributes.txtar

Documentation: cuelang.org/go/cue/testdata/resolve

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

View as plain text