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

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