#path: out

Self-contained export across package boundaries with nested
(Def & {...}).field patterns that include conditionals which used to
lose dependencies due to incomplete fixpoint iteration.

-- cue.mod/module.cue --
module: "test.example"
language: version: "v0.9.0"
-- in.cue --
import "test.example/pkg"

pkg.#Module
-- pkg/pkg.cue --
package pkg

#Extract: {
	req: {...}
	out: [
		if req.features != _|_ {req.features},
		{devMode: false},
	][0]
}

#Module: {
	out: (#Extract & {req: features: devMode: true}).out
}
-- out/self-v3/default --

_#def
_#def: (EXTRACT.#x & {
	req: {
		features: {
			devMode: true
		}
	}
}).out

//cue:path: #Extract
let EXTRACT = {
	#x: {
		req: {
			...
		}
		out: [
			if FEATURES != _|_ // explicit error (_|_ literal) in source
			{
				FEATURES
			}, {
				devMode: false
			}][0]
	}
}

//cue:path: req.features
let FEATURES = {
	devMode: true
}
-- out/self-v3-noshare/default --

_#def
_#def: (EXTRACT.#x & {
	req: {
		features: {
			devMode: true
		}
	}
}).out

//cue:path: #Extract
let EXTRACT = {
	#x: {
		req: {
			...
		}
		out: [
			if FEATURES != _|_ // explicit error (_|_ literal) in source
			{
				FEATURES
			}, {
				devMode: false
			}][0]
	}
}

//cue:path: req.features
let FEATURES = {
	devMode: true
}
-- out/self/default --
