github.com/solo-io/cue@v0.4.7/cue/testdata/fulleval/042_cross-dependent_comprehension.txtar (about)

     1  # DO NOT EDIT; generated by go run testdata/gen.go
     2  #
     3  #name: cross-dependent comprehension
     4  #evalFull
     5  -- in.cue --
     6  #a: {
     7  	if b {
     8  		c: 4
     9  	}
    10  	b: bool
    11  }
    12  x: (#a & {b: true}) & {c: 4}
    13  y: x
    14  -- out/def --
    15  x: _|_ // field "c" not allowed in closed struct
    16  y: _|_ // field "c" not allowed in closed struct
    17  #a: {
    18  	b: bool
    19  	if b {
    20  		c: 4
    21  	}
    22  }
    23  -- out/legacy-debug --
    24  <0>{x: _|_(4:field "c" not allowed in closed struct), y: _|_(4:field "c" not allowed in closed struct), #a: <1>C{b: bool if <2>.b yield <3>C{c: 4}}}
    25  -- out/compile --
    26  --- in.cue
    27  {
    28    #a: {
    29      if 〈0;b〉 {
    30        c: 4
    31      }
    32      b: bool
    33    }
    34    x: ((〈0;#a〉 & {
    35      b: true
    36    }) & {
    37      c: 4
    38    })
    39    y: 〈0;x〉
    40  }
    41  -- out/eval --
    42  (struct){
    43    #a: (_|_){
    44      // [incomplete] #a: incomplete bool: bool
    45      b: (bool){ bool }
    46    }
    47    x: (#struct){
    48      b: (bool){ true }
    49      c: (int){ 4 }
    50    }
    51    y: (#struct){
    52      b: (bool){ true }
    53      c: (int){ 4 }
    54    }
    55  }