-- in.cue --
#foo: {
	name: string
}
foo: #foo & {
	// These should all be allowed.
	_name:  "foo"
	_#name: "bar"

	#name: "baz"
}
-- out/eval/stats --
Leaks:  0
Freed:  8
Reused: 5
Allocs: 3
Retain: 0

Unifications: 8
Conjuncts:    10
Disjuncts:    8
-- out/evalalpha --
(struct){
  #foo: (#struct){
    name: (string){ string }
  }
  foo: (#struct){
    _name: (string){ "foo" }
    _#name: (string){ "bar" }
    #name: (string){ "baz" }
    name: (string){ string }
  }
}
-- diff/-out/evalalpha<==>+out/eval --
diff old new
--- old
+++ new
@@ -3,9 +3,9 @@
     name: (string){ string }
   }
   foo: (#struct){
-    name: (string){ string }
     _name: (string){ "foo" }
     _#name: (string){ "bar" }
     #name: (string){ "baz" }
+    name: (string){ string }
   }
 }
-- diff/todo/p3 --
Reordering.
-- diff/explanation --
New evaluator should ultimately disallow new definitions in closed structs.
-- out/eval --
(struct){
  #foo: (#struct){
    name: (string){ string }
  }
  foo: (#struct){
    name: (string){ string }
    _name: (string){ "foo" }
    _#name: (string){ "bar" }
    #name: (string){ "baz" }
  }
}
-- out/compile --
--- in.cue
{
  #foo: {
    name: string
  }
  foo: (〈0;#foo〉 & {
    _name: "foo"
    _#name: "bar"
    #name: "baz"
  })
}
