cuelang.org/go@v0.10.1/cue/testdata/fulleval/055_issue318.txtar (about)

     1  # DO NOT EDIT; generated by go run testdata/gen.go
     2  #
     3  #name: issue318
     4  #evalFull
     5  -- in.cue --
     6  #T: {
     7  	arg: x: string
     8  	out1: "\(arg.x) \(arg.y)"
     9  	out2: "\(arg.y)"
    10  	vx:   arg.x
    11  	vy:   arg.y
    12  }
    13  -- out/def --
    14  #T: {
    15  	arg: {
    16  		x: string
    17  	}
    18  	out1: _|_ // undefined field "y"
    19  	out2: _|_ // undefined field "y"
    20  	vx:   arg.x
    21  	vy:   _|_ // undefined field "y"
    22  }
    23  -- out/export --
    24  
    25  -- out/yaml --
    26  {}
    27  -- out/json --
    28  {}
    29  -- out/legacy-debug --
    30  <0>{#T: <1>C{arg: <2>C{x: string}, out1: _|_(<3>.arg.y:undefined field "y"), out2: _|_(<3>.arg.y:undefined field "y"), vx: string, vy: _|_(<3>.arg.y:undefined field "y")}}
    31  -- out/compile --
    32  --- in.cue
    33  {
    34    #T: {
    35      arg: {
    36        x: string
    37      }
    38      out1: "\(〈0;arg〉.x) \(〈0;arg〉.y)"
    39      out2: "\(〈0;arg〉.y)"
    40      vx: 〈0;arg〉.x
    41      vy: 〈0;arg〉.y
    42    }
    43  }
    44  -- out/eval/stats --
    45  Leaks:  0
    46  Freed:  8
    47  Reused: 4
    48  Allocs: 4
    49  Retain: 0
    50  
    51  Unifications: 8
    52  Conjuncts:    9
    53  Disjuncts:    8
    54  -- out/eval --
    55  Errors:
    56  #T.out1: invalid interpolation: undefined field: y:
    57      ./in.cue:3:8
    58      ./in.cue:3:24
    59  #T.out2: invalid interpolation: undefined field: y:
    60      ./in.cue:4:8
    61      ./in.cue:4:15
    62  #T.vy: undefined field: y:
    63      ./in.cue:6:12
    64  
    65  Result:
    66  (_|_){
    67    // [eval]
    68    #T: (_|_){
    69      // [eval]
    70      arg: (#struct){
    71        x: (string){ string }
    72      }
    73      out1: (_|_){
    74        // [eval] #T.out1: invalid interpolation: undefined field: y:
    75        //     ./in.cue:3:8
    76        //     ./in.cue:3:24
    77      }
    78      out2: (_|_){
    79        // [eval] #T.out2: invalid interpolation: undefined field: y:
    80        //     ./in.cue:4:8
    81        //     ./in.cue:4:15
    82      }
    83      vx: (string){ string }
    84      vy: (_|_){
    85        // [eval] #T.vy: undefined field: y:
    86        //     ./in.cue:6:12
    87      }
    88    }
    89  }