github.com/solo-io/cue@v0.4.7/cue/testdata/resolve/008_attributes.txtar (about)

     1  # DO NOT EDIT; generated by go run testdata/gen.go
     2  #
     3  #name: attributes
     4  #evalPartial
     5  -- in.cue --
     6  a: {foo: 1 @foo() @baz(1)}
     7  b: {foo: 1 @bar() @foo()}
     8  c: a & b
     9  
    10  e: a & {foo: 1 @foo(other)}
    11  -- out/def --
    12  a: {
    13  	foo: 1 @baz(1) @foo()
    14  }
    15  b: {
    16  	foo: 1 @bar() @foo()
    17  }
    18  c: a & b
    19  e: _|_ // 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 --
    37  (struct){
    38    a: (struct){
    39      foo: (int){ 1 }
    40    }
    41    b: (struct){
    42      foo: (int){ 1 }
    43    }
    44    c: (struct){
    45      foo: (int){ 1 }
    46    }
    47    e: (struct){
    48      foo: (int){ 1 }
    49    }
    50  }