-- in.cue -- import "encoding/yaml" issue700: { a: y: "y" test1: *a.x | 1 test2: *a.y | 1 } lookup: { x: { name: "Hello" } y: x.a ok1: *x.a | x ok2: x | *x.a ok3: x.a | *x ok4: *x | x.a ok5: x | x.a ok5: x.a | x allFail1: x.a | x.b allFail2: x.a | x.b } func: { s: string ok1: yaml.MarshalStream(s) | yaml.Marshal(s) } issue782: { a: { inner: string interpolation: *"\(inner)" | string interpolation: "override" } b: { inner: string interpolation: string | *"\(inner)" interpolation: "override" } c: { inner: string interpolation: "\(inner)" | string interpolation: "override" } d: { inner: string interpolation: string | "\(inner)" interpolation: "override" } } -- out/eval/stats -- Leaks: 0 Freed: 70 Reused: 64 Allocs: 6 Retain: 0 Unifications: 40 Conjuncts: 99 Disjuncts: 70 -- out/eval -- (struct){ issue700: (struct){ a: (struct){ y: (string){ "y" } } test1: (int){ 1 } test2: ((int|string)){ |(*(string){ "y" }, (int){ 1 }) } } lookup: (struct){ x: (struct){ name: (string){ "Hello" } } y: (_|_){ // [incomplete] lookup.y: undefined field: a: // ./in.cue:13:14 } ok1: (struct){ name: (string){ "Hello" } } ok2: (struct){ name: (string){ "Hello" } } ok3: (struct){ name: (string){ "Hello" } } ok4: (struct){ name: (string){ "Hello" } } ok5: (struct){ name: (string){ "Hello" } } allFail1: (_|_){ // [incomplete] lookup.allFail1: 2 errors in empty disjunction: // lookup.allFail1: undefined field: a: // ./in.cue:20:14 // lookup.allFail1: undefined field: b: // ./in.cue:20:20 } allFail2: (_|_){ // [incomplete] lookup.allFail2: 2 errors in empty disjunction: // lookup.allFail2: undefined field: a: // ./in.cue:21:14 // lookup.allFail2: undefined field: b: // ./in.cue:21:20 } } func: (struct){ s: (string){ string } ok1: (_|_){ // [incomplete] func.ok1: 2 errors in empty disjunction: // func.ok1: non-concrete argument 0: // ./in.cue:26:7 // func.ok1: non-concrete argument 0: // ./in.cue:26:31 } } issue782: (struct){ a: (struct){ inner: (string){ string } interpolation: (string){ "override" } } b: (struct){ inner: (string){ string } interpolation: (string){ "override" } } c: (struct){ inner: (string){ string } interpolation: (string){ "override" } } d: (struct){ inner: (string){ string } interpolation: (string){ "override" } } } } -- out/compile -- --- in.cue { issue700: { a: { y: "y" } test1: (*〈0;a〉.x|1) test2: (*〈0;a〉.y|1) } lookup: { x: { name: "Hello" } y: 〈0;x〉.a ok1: (*〈0;x〉.a|〈0;x〉) ok2: (〈0;x〉|*〈0;x〉.a) ok3: (〈0;x〉.a|*〈0;x〉) ok4: (*〈0;x〉|〈0;x〉.a) ok5: (〈0;x〉|〈0;x〉.a) ok5: (〈0;x〉.a|〈0;x〉) allFail1: (〈0;x〉.a|〈0;x〉.b) allFail2: (〈0;x〉.a|〈0;x〉.b) } func: { s: string ok1: (〈import;"encoding/yaml"〉.MarshalStream(〈0;s〉)|〈import;"encoding/yaml"〉.Marshal(〈0;s〉)) } issue782: { a: { inner: string interpolation: (*"\(〈0;inner〉)"|string) interpolation: "override" } b: { inner: string interpolation: (string|*"\(〈0;inner〉)") interpolation: "override" } c: { inner: string interpolation: ("\(〈0;inner〉)"|string) interpolation: "override" } d: { inner: string interpolation: (string|"\(〈0;inner〉)") interpolation: "override" } } }