#name: detectIncompleteYAML
#evalFull
-- in.cue --
package foobar

import yaml "encoding/yaml"

#Spec: {
	_vars: {something: string}
	data: {
		#foo: {
			use: _vars.something
		}
		baz:    yaml.Marshal(_vars.something) @test(err, code=incomplete, pos=[0:11])
		foobar: yaml.Marshal(#foo)            @test(err, code=incomplete, pos=[0:11, -6:21, -3:9])
	}
}
Val: #Spec & {
	_vars: something: "var-string"
} @test(eq, {
	_vars$foobar: something: "var-string"
	data: {
		#foo: use:    "var-string"
		baz:   "var-string\n"
		foobar: "use: var-string\n"
	}
})
-- out/errors.txt --
[incomplete] #Spec.data.baz: error in call to encoding/yaml.Marshal: non-concrete argument 0:
    ./in.cue:11:11
[incomplete] #Spec.data.foobar: error in call to encoding/yaml.Marshal: incomplete value string:
    ./in.cue:12:11
    ./in.cue:6:21
    ./in.cue:9:9
-- out/eval/stats --
Leaks:  0
Freed:  17
Reused: 12
Allocs: 5
Retain: 0

Unifications: 17
Conjuncts:    32
Disjuncts:    17
