# Tests that combining a definition with open spread (`...`) and a non-definition
# struct preserves the expected fields including hidden definitions and defaults.
# Issue: https://cuelang.org/issue/539
-- in.cue --
#Schema: {
	...
}

Component: {
	hostname: string | *"localhost"

	_#foo: {
		hello: "world"
	}
}

hello: #Schema & Component
-- out/compile --
--- in.cue
{
  #Schema: {
    ...
  }
  Component: {
    hostname: (string|*"localhost")
    _#foo: {
      hello: "world"
    }
  }
  hello: (〈0;#Schema〉 & 〈0;Component〉)
}
