blob: 9996182bd8a2317238825991cec487aa1c08c6a7 [file] [log] [blame]
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: detectIncompleteJSON
#evalFull
-- in.cue --
package foobar
import "encoding/json"
#Spec: {
_vars: {something: string}
data: {
#foo: {
use: _vars.something
}
baz: json.Marshal(_vars.something)
foobar: json.Marshal(#foo)
}
}
Val: #Spec & {
_vars: something: "var-string"
}
-- out/def --
package foobar
import "encoding/json"
#Spec: {
_vars: {
something: string
}
data: {
#foo: {
use: _vars.something
}
baz: json.Marshal(_vars.something)
foobar: json.Marshal(#foo)
}
}
Val: #Spec & {
_vars: {
something: "var-string"
}
}
-- out/export --
Val: {
data: {
baz: "\"var-string\""
foobar: "{\"use\":\"var-string\"}"
}
}
-- out/yaml --
Val:
data:
baz: '"var-string"'
foobar: '{"use":"var-string"}'
-- out/json --
{"Val":{"data":{"baz":"\"var-string\"","foobar":"{\"use\":\"var-string\"}"}}}
-- out/legacy-debug --
<0>{#Spec: <1>C{_vars: <2>C{something: string}, data: <3>C{#foo: <4>C{use: string}, baz: <5>.Marshal (<6>._vars.something), foobar: <5>.Marshal (<7>.#foo)}}, Val: <8>C{_vars: <9>C{something: "var-string"}, data: <10>C{#foo: <11>C{use: "var-string"}, baz: "\"var-string\"", foobar: "{\"use\":\"var-string\"}"}}}
-- out/eval --
(struct){
#Spec: (#struct){
_vars(:foobar): (#struct){
something: (string){ string }
}
data: (#struct){
#foo: (#struct){
use: (string){ string }
}
baz: (_|_){
// [incomplete] #Spec.data.baz: non-concrete argument 0:
// ./in.cue:11:11
}
foobar: (_|_){
// [incomplete] cannot convert incomplete value "string" to JSON
}
}
}
Val: (#struct){
_vars(:foobar): (#struct){
something: (string){ "var-string" }
}
data: (#struct){
#foo: (#struct){
use: (string){ "var-string" }
}
baz: (string){ "\"var-string\"" }
foobar: (string){ "{\"use\":\"var-string\"}" }
}
}
}
-- out/compile --
--- in.cue
{
#Spec: {
_vars: {
something: string
}
data: {
#foo: {
use: 2;_vars〉.something
}
baz: import;"encoding/json"〉.Marshal(〈1;_vars〉.something)
foobar: import;"encoding/json"〉.Marshal(〈0;#foo〉)
}
}
Val: (〈0;#Spec & {
_vars: {
something: "var-string"
}
})
}