#name: struct comprehensions
#evalPartial
-- in.cue --
obj: foo: a: "bar"
obj: [Name=string]: {
	a: *"dummy" | string
	if true {
		sub: as: a
	}
}

for k, v in {#def: 1, opt?: 2, _hid: 3, reg: 4} {
	"\(k)": v
}
@test(eq, {
  obj: foo: {
      a: "bar"
      sub: as: "bar"
  },
  reg: 4
})

-- out/eval/stats --
Leaks:  2
Freed:  12
Reused: 7
Allocs: 7
Retain: 2

Unifications: 10
Conjuncts:    19
Disjuncts:    13

MisalignedConjunct: 5

NumCloseIDs: 2
