-- in.cue --
package x

#PDB: {y: int}

result: resources: {
	if true {
		x: #PDB & {y: 1}
	}
}

out: ({
	cfg: resources: _
	out: {for n, _ in cfg.resources {(n): "x"}}
} & {cfg: result}).out
-- out/compile --
--- in.cue
{
  #PDB: {
    y: int
  }
  result: {
    resources: {
      if true {
        x: (〈3;#PDB〉 & {
          y: 1
        })
      }
    }
  }
  out: ({
    cfg: {
      resources: _
    }
    out: {
      for n, _ in 〈1;cfg〉.resources {
        〈1;n〉: "x"
      }
    }
  } & {
    cfg: 〈1;result〉
  }).out
}
