github.com/solo-io/cue@v0.4.7/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 -- 45 Errors: 46 #T.out1: invalid interpolation: undefined field: y: 47 ./in.cue:3:8 48 ./in.cue:3:24 49 #T.out2: invalid interpolation: undefined field: y: 50 ./in.cue:4:8 51 ./in.cue:4:15 52 #T.vy: undefined field: y: 53 ./in.cue:6:12 54 55 Result: 56 (_|_){ 57 // [eval] 58 #T: (_|_){ 59 // [eval] 60 arg: (#struct){ 61 x: (string){ string } 62 } 63 out1: (_|_){ 64 // [eval] #T.out1: invalid interpolation: undefined field: y: 65 // ./in.cue:3:8 66 // ./in.cue:3:24 67 } 68 out2: (_|_){ 69 // [eval] #T.out2: invalid interpolation: undefined field: y: 70 // ./in.cue:4:8 71 // ./in.cue:4:15 72 } 73 vx: (string){ string } 74 vy: (_|_){ 75 // [eval] #T.vy: undefined field: y: 76 // ./in.cue:6:12 77 } 78 } 79 }