cuelang.org/go@v0.10.1/cue/testdata/eval/issue2550.txtar (about) 1 -- in.cue -- 2 foo: string 3 bar: close({}) 4 5 if bar.missing == "x" { 6 let _bar = bar 7 foo: _bar 8 } 9 -- out/compile -- 10 --- in.cue 11 { 12 foo: string 13 bar: close({}) 14 if (〈0;bar〉.missing == "x") { 15 let _bar#1 = 〈1;bar〉 16 foo: 〈0;let _bar#1〉 17 } 18 } 19 -- out/eval/stats -- 20 Leaks: 1 21 Freed: 4 22 Reused: 1 23 Allocs: 4 24 Retain: 2 25 26 Unifications: 5 27 Conjuncts: 5 28 Disjuncts: 6 29 -- out/eval -- 30 Errors: 31 undefined field: missing: 32 ./in.cue:4:8 33 34 Result: 35 (_|_){ 36 // [eval] undefined field: missing: 37 // ./in.cue:4:8 38 foo: (string){ string } 39 bar: (#struct){ 40 } 41 let _bar#1 = (_){ _ } 42 } 43 -- out/evalalpha -- 44 (_|_){ 45 // [incomplete] undefined field: missing: 46 // ./in.cue:4:8 47 foo: (_|_){ 48 // [incomplete] undefined field: missing: 49 // ./in.cue:4:8 50 } 51 bar: (#struct){ 52 } 53 let _bar#1 = (_|_){ 54 // [incomplete] undefined field: missing: 55 // ./in.cue:4:8 56 } 57 } 58 -- diff/-out/evalalpha<==>+out/eval -- 59 diff old new 60 --- old 61 +++ new 62 @@ -1,13 +1,14 @@ 63 -Errors: 64 -undefined field: missing: 65 - ./in.cue:4:8 66 - 67 -Result: 68 (_|_){ 69 - // [eval] undefined field: missing: 70 + // [incomplete] undefined field: missing: 71 // ./in.cue:4:8 72 - foo: (string){ string } 73 + foo: (_|_){ 74 + // [incomplete] undefined field: missing: 75 + // ./in.cue:4:8 76 + } 77 bar: (#struct){ 78 } 79 - let _bar#1 = (_){ _ } 80 + let _bar#1 = (_|_){ 81 + // [incomplete] undefined field: missing: 82 + // ./in.cue:4:8 83 + } 84 } 85 -- diff/todo/p2 -- 86 Let seems to have misplaced error, even though it does not affect outcome.