| # DO NOT EDIT; generated by go run testdata/gen.go |
| # |
| #name: Issue #94 |
| #evalFull |
| -- in.cue -- |
| foo: { |
| opt?: 1 |
| "txt": 2 |
| #def: 3 |
| regular: 4 |
| _hidden: 5 |
| } |
| comp: {for k, v in foo {"\(k)": v}} |
| select: { |
| opt: foo.opt |
| "txt": foo.txt |
| #def: foo.#def |
| regular: foo.regular |
| _hidden: foo._hidden |
| } |
| index: { |
| opt: foo["opt"] |
| "txt": foo["txt"] |
| #def: foo["#def"] |
| regular: foo["regular"] |
| _hidden: foo["_hidden"] |
| } |
| -- out/def -- |
| foo: { |
| opt?: 1 |
| txt: 2 |
| #def: 3 |
| regular: 4 |
| _hidden: 5 |
| } |
| comp: { |
| txt: 2 |
| regular: 4 |
| } |
| select: { |
| opt: foo.opt |
| txt: 2 |
| #def: 3 |
| regular: 4 |
| _hidden: 5 |
| } |
| index: { |
| opt: foo["opt"] |
| txt: 2 |
| #def: foo["#def"] |
| regular: 4 |
| _hidden: foo["_hidden"] |
| } |
| -- out/legacy-debug -- |
| <0>{foo: <1>{opt?: 1, txt: 2, #def: 3, regular: 4, _hidden: 5}, comp: <2>{txt: 2, regular: 4}, select: <3>{opt: <4>.foo.opt, txt: 2, #def: 3, regular: 4, _hidden: 5}, index: <5>{opt: <4>.foo["opt"], txt: 2, #def: <4>.foo["#def"], regular: 4, _hidden: <4>.foo["_hidden"]}} |
| -- out/compile -- |
| --- in.cue |
| { |
| foo: { |
| opt?: 1 |
| txt: 2 |
| #def: 3 |
| regular: 4 |
| _hidden: 5 |
| } |
| comp: { |
| for k, v in 〈1;foo〉 { |
| "\(〈1;k〉)": 〈1;v〉 |
| } |
| } |
| select: { |
| opt: 〈1;foo〉.opt |
| txt: 〈1;foo〉.txt |
| #def: 〈1;foo〉.#def |
| regular: 〈1;foo〉.regular |
| _hidden: 〈1;foo〉._hidden |
| } |
| index: { |
| opt: 〈1;foo〉["opt"] |
| txt: 〈1;foo〉["txt"] |
| #def: 〈1;foo〉["#def"] |
| regular: 〈1;foo〉["regular"] |
| _hidden: 〈1;foo〉["_hidden"] |
| } |
| } |
| -- out/eval -- |
| (struct){ |
| foo: (struct){ |
| txt: (int){ 2 } |
| #def: (int){ 3 } |
| regular: (int){ 4 } |
| _hidden: (int){ 5 } |
| } |
| comp: (struct){ |
| txt: (int){ 2 } |
| regular: (int){ 4 } |
| } |
| select: (struct){ |
| opt: (_|_){ |
| // [incomplete] select.opt: cannot reference optional field: opt: |
| // ./in.cue:10:15 |
| } |
| txt: (int){ 2 } |
| #def: (int){ 3 } |
| regular: (int){ 4 } |
| _hidden: (int){ 5 } |
| } |
| index: (struct){ |
| opt: (_|_){ |
| // [incomplete] index.opt: cannot reference optional field: opt: |
| // ./in.cue:17:15 |
| } |
| txt: (int){ 2 } |
| #def: (_|_){ |
| // [incomplete] index.#def: undefined field: "#def": |
| // ./in.cue:19:15 |
| } |
| regular: (int){ 4 } |
| _hidden: (_|_){ |
| // [incomplete] index._hidden: undefined field: "_hidden": |
| // ./in.cue:21:15 |
| } |
| } |
| } |