#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)
		foobar: yaml.Marshal(#foo)
	}
}
Val: #Spec & {
	_vars: something: "var-string"
}
-- out/compile --
--- in.cue
{
  #Spec: {
    _vars(:foobar): {
      something: string
    }
    data: {
      #foo: {
        use: 〈2;_vars(:foobar)〉.something
      }
      baz: 〈import;"encoding/yaml"〉.Marshal(〈1;_vars(:foobar)〉.something)
      foobar: 〈import;"encoding/yaml"〉.Marshal(〈0;#foo〉)
    }
  }
  Val: (〈0;#Spec〉 & {
    _vars(:foobar): {
      something: "var-string"
    }
  })
}
