This test tests a case where a child node needs to be evaluated
before evaluating a parent has completed.

-- in.cue --
a: [for c in foo.bar.baz {
	c
}]

a: [{name: "http"}]

foo: {
	x.D

	bar: baz: [{port: 8080}]
}

x: {
	D: bar: DSpec
	DSpec: {}
}
-- out/compile --
--- in.cue
{
  a: [
    for _, c in 〈1;foo〉.bar.baz {
      〈1;c〉
    },
  ]
  a: [
    {
      name: "http"
    },
  ]
  foo: {
    〈1;x〉.D
    bar: {
      baz: [
        {
          port: 8080
        },
      ]
    }
  }
  x: {
    D: {
      bar: 〈1;DSpec〉
    }
    DSpec: {}
  }
}
-- out/eval/stats --
Leaks:  0
Freed:  14
Reused: 5
Allocs: 9
Retain: 9

Unifications: 14
Conjuncts:    23
Disjuncts:    23
-- out/evalalpha --
(struct){
  a: (#list){
    0: (struct){
      name: (string){ "http" }
      port: (int){ 8080 }
    }
  }
  foo: (struct){
    bar: (struct){
      baz: (#list){
        0: (struct){
          port: (int){ 8080 }
        }
      }
    }
  }
  x: (struct){
    D: (struct){
      bar: (struct){
      }
    }
    DSpec: (struct){
    }
  }
}
-- diff/-out/evalalpha<==>+out/eval --
diff old new
--- old
+++ new
@@ -1,8 +1,8 @@
 (struct){
   a: (#list){
     0: (struct){
-      port: (int){ 8080 }
       name: (string){ "http" }
+      port: (int){ 8080 }
     }
   }
   foo: (struct){
-- diff/explanation --
Reordering.
-- out/eval --
(struct){
  a: (#list){
    0: (struct){
      port: (int){ 8080 }
      name: (string){ "http" }
    }
  }
  foo: (struct){
    bar: (struct){
      baz: (#list){
        0: (struct){
          port: (int){ 8080 }
        }
      }
    }
  }
  x: (struct){
    D: (struct){
      bar: (struct){
      }
    }
    DSpec: (struct){
    }
  }
}
