raw: true
eval: true
noOpt: true
#inlinetest:exclude skip — tests export format, not evaluator semantics
-- in.cue --
{
	reg: {foo: 1, bar: {baz: 3}}
	#def: {
		a: 1

		sub: reg
	}
	val: #def
	#def2: {
		a: {b: int}
	}
	val2: #def2
}
-- out/eval/stats --
Leaks:  0
Freed:  16
Reused: 5
Allocs: 11
Retain: 0

Unifications: 16
Conjuncts:    18
Disjuncts:    0

NumCloseIDs: 2
-- out/evalalpha --
(struct){
  reg: (struct){
    foo: (int){ 1 }
    bar: (struct){
      baz: (int){ 3 }
    }
  }
  #def: (#struct){
    a: (int){ 1 }
    sub: (#struct){
      foo: (int){ 1 }
      bar: (#struct){
        baz: (int){ 3 }
      }
    }
  }
  val: ~(#def)
  #def2: (#struct){
    a: (#struct){
      b: (int){ int }
    }
  }
  val2: ~(#def2)
}
-- diff/-out/evalalpha<==>+out/eval --
diff old new
--- old
+++ new
@@ -14,23 +14,11 @@
       }
     }
   }
-  val: (#struct){
-    a: (int){ 1 }
-    sub: (#struct){
-      foo: (int){ 1 }
-      bar: (#struct){
-        baz: (int){ 3 }
-      }
-    }
-  }
+  val: ~(#def)
   #def2: (#struct){
     a: (#struct){
       b: (int){ int }
     }
   }
-  val2: (#struct){
-    a: (#struct){
-      b: (int){ int }
-    }
-  }
+  val2: ~(#def2)
 }
-- out/eval --
(struct){
  reg: (struct){
    foo: (int){ 1 }
    bar: (struct){
      baz: (int){ 3 }
    }
  }
  #def: (#struct){
    a: (int){ 1 }
    sub: (#struct){
      foo: (int){ 1 }
      bar: (#struct){
        baz: (int){ 3 }
      }
    }
  }
  val: (#struct){
    a: (int){ 1 }
    sub: (#struct){
      foo: (int){ 1 }
      bar: (#struct){
        baz: (int){ 3 }
      }
    }
  }
  #def2: (#struct){
    a: (#struct){
      b: (int){ int }
    }
  }
  val2: (#struct){
    a: (#struct){
      b: (int){ int }
    }
  }
}
