-- in.cue --
issue4011: full: {
	let _hugoEnvironments = {
		default:    "_default"
		production: "production"
	}

	site: cls: _
	site: [_]: {
		fs: {
			Create: {
				for envID, envName in _hugoEnvironments
				let envConfig = hugo[envID]
				if envConfig != _|_ {
					config: Contents: envConfig
				}
			}
		}

		hugo: _
	}

	site: [_]: hugo: production: {}
	@test(eq, {site: cls: {
		fs: Create: config: Contents: {}
		hugo: production: {}
	}})
}
issue4011: reduced: {
	@test(eq, {result: foo: true, envs: foo: {}})
	result: {
		for envName in ["foo"]
		let env = envs[envName]
		if env != _|_ {
			(envName): true
		}
	}
	envs: foo: {}
}
-- out/eval/stats --
Leaks:  5
Freed:  22
Reused: 12
Allocs: 15
Retain: 17

Unifications: 27
Conjuncts:    33
Disjuncts:    37

MisalignedConjunct: 4

NumCloseIDs: 2
