| # DO NOT EDIT; generated by go run testdata/gen.go |
| # |
| #name: issue314 |
| #evalFull |
| -- in.cue -- |
| import ( |
| "text/template" |
| "encoding/yaml" |
| "encoding/json" |
| ) |
| |
| x: { |
| s: "myname" |
| T |
| } |
| |
| T :: { |
| s: string |
| out: template.Execute("{{.s}}", { |
| "s": s |
| }) |
| } |
| |
| V :: { |
| s: string |
| out: json.Marshal({"s": s}) |
| } |
| |
| U :: { |
| s: string |
| out: yaml.Marshal({"s": s}) |
| } |
| -- out/def -- |
| import ( |
| "encoding/json" |
| "encoding/yaml" |
| "text/template" |
| ) |
| |
| T :: { |
| s: string |
| S = s |
| out: template.Execute("{{.s}}", { |
| s: S |
| }) |
| } |
| x: { |
| s: "myname" |
| T |
| } |
| V :: { |
| s: string |
| S658221 = s |
| out: json.Marshal({ |
| s: S658221 |
| }) |
| } |
| U :: { |
| s: string |
| S629a0f = s |
| out: yaml.Marshal({ |
| s: S629a0f |
| }) |
| } |
| -- out/export -- |
| x: { |
| s: "myname" |
| out: "myname" |
| } |
| -- out/yaml -- |
| x: |
| s: myname |
| out: myname |
| -- out/json -- |
| {"x":{"s":"myname","out":"myname"}} |
| -- out/legacy-debug -- |
| <0>{T :: <1>C{s: string, out: <2>.Execute ("{{.s}}",<3>C{s: <4>.s})}, x: <5>C{s: "myname", out: "myname"}, V :: <6>C{s: string, out: <7>.Marshal (<8>C{s: <9>.s})}, U :: <10>C{s: string, out: <11>.Marshal (<12>C{s: <13>.s})}} |